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