This method gets the charger status and battery voltage. It is equivalent to the AT#CBC command.
It has no input parameters.
The return value is a Python tuple formatted in the following way:
(chargerStatus, batteryVoltage).
First element of tuple is a Python integer which is charger status:
0 - charger not connected
1 - charger connected and charging
2 - charger connected and charging process completed
Second element of tuple is a Python integer which is battery voltage in mV.
Example:
cbc = GPIO.getCBC()
gets charger status and battery voltage values, assigning the return value to cbc tuple.
|
|
Note: For version 18.11.004 the return values 1 and 2 for charger status are not supported. |