This commit is contained in:
Adrien Van 2017-02-15 22:27:08 +01:00
parent e5bb8fcc4c
commit 72eb1efda4
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#include "mesure.h"
#define __PIN_PWM__ 3
#define DEBUG
//#define DEBUG
float target_curent = 0.05;//ma
courant collecteur(A0,A1,100,1,1,0.248,0.248); // R1 10K, R2 3K3
courant base(A2,A3,820);
@ -25,7 +25,7 @@ void setup()
void loop()
{
static int PWMCourent = 122;
float iBase = base.lireCourant();
double iBase = base.lireCourant();
if(iBase < target_curent*0.9)
PWMCourent++;
else if(iBase > target_curent)