Monitor battery voltage #4327
Replies: 1 comment
-
Posted at 2015-01-14 by @gfwilliams Hi Tobias, Well, one very simple method is to detect when the battery voltage goes below ~3v. Basically as the battery voltage lowers, the voltage regulator stops being able to supply 3.3v to the STM32 chip in Espruino - and you can detect that. You can use E.getAnalogVRef() to see what voltage Espruino thinks it is at, so for instance you could do:
To go to sleep, you'll want to have called |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-01-14 by net-tobi
Hello everyone,
do you know an easy and elegant way to monitor the battery charge (remaining voltage) of the power source of the Espruino and react when the battery is low and put the Espruino into sleep mode?
Best,
Tobias
Beta Was this translation helpful? Give feedback.
All reactions