Created
March 11, 2014 17:48
-
-
Save amcjen/9491143 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# power | |
## power.ischarging | |
#### Description | |
`int power.ischarging()` | |
Determines if the Scout is charging its battery via USB. This will also mirror the orange charging LED next to the USB port, which also shines when charging, and turns off when either fully-charged, or the Scout is not plugged in. | |
``` | |
> print power.ischarging | |
> 1 | |
``` | |
#### Parameters | |
None | |
#### Return Values | |
Returns `0` if the Scout is not charging, and `1` if it is charging. | |
#### Warning | |
The results of this command are undefined if you don't have a battery plugged into the Scout, and only powering it via USB. This is due to the Lipo battery charger constantly trying to charge the non-existent battery. | |
## power.percent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment