[API] Driver Battery - Thomas-Broussard/hackberry-enableFrance GitHub Wiki
Hackberry_battery
class Summary
Members | Descriptions |
---|---|
public Hackberry_battery () |
Constructor of the Battery driver |
public void init (unsigned char pinBattery) |
Initialize the Battery driver |
public unsigned char read () |
read the level of the battery monitor |
public unsigned char readAverage () |
Perform a battery monitor reading by averaging the result on 16 consecutive points |
Members
public
Hackberry_battery
()
Constructor of the Battery driver
public void
init
(unsigned char pinBattery)
Initialize the Battery driver
Parameters
pinBattery
analog input - pin of the battery monitoring system
public unsigned char
read
()
read the level of the battery monitor
Returns
lvl of battery (between 0 and 100%)
public unsigned char
readAverage
()
Perform a battery monitor reading by averaging the result on 16 consecutive points
Returns
average level of the battery (between 0 and 100%) on 16 consecutive acquisitions