Modifications

Sauter à la navigation Sauter à la recherche
Ligne 26 : Ligne 26 :  
To make this easy we stuck a double-100K resistor divider on the '''BAT''' pin, and connected it to '''D9''' (a.k.a analog #7 '''A7'''). You can read this pin's voltage, then double it, to get the battery voltage.
 
To make this easy we stuck a double-100K resistor divider on the '''BAT''' pin, and connected it to '''D9''' (a.k.a analog #7 '''A7'''). You can read this pin's voltage, then double it, to get the battery voltage.
   −
<nowiki>#define VBATPIN A7
+
<nowiki>#define VBATPIN A7
 
    
 
    
 
float measuredvbat = analogRead(VBATPIN);
 
float measuredvbat = analogRead(VBATPIN);
29 917

modifications

Menu de navigation