• Ok, great - glad you're getting there! 0.64mA is still more than I'd expect though...

    Should I wire it to the 3.3V instead

    As others have said, please don't try that :) The Espruino WiFi actually has a pretty decent voltage regulator on board - the quiescent current (that drawn by the regulator) is something in the range of 0.002mA so there are definitely other issues :)

    Is there a way to read the battery voltage level?

    Not directly, since the battery voltage is never connected to the MCU. You can use E.getAnalogVRef() to get the MCU voltage, which will sit at 3.3v until the LiPo voltage drops below 3.4v(ish). If you google lipo discharge curve you'll see it's at about 98% discharged by that point.

    If you want to get a proper reading you'd need to set up a potential divider (maybe 2x 100k resistors) to halve the battery voltage, then put that into an ADC pin (with a small capacitor between it and GND to help keep the voltage constant) and read the value.

    Maybe time for that (0.05) test to be re-visited? or at least what the setup was then

    As I mentioned above, I actually ran the code and got this figure with up to date firmwares just a few days ago.

About

Avatar for Gordon @Gordon started