• It has to be happening in the battery circuit, because there's no other circuit between the Espruino and the battery cells, except for that built-in circuit. The PCB's power LED goes out, and the Espruino disconnects from my computer and disappears from available devices.

    I changed the wiring so that the Espruino isn't powered by the battery, but via USB only, and the battery is lasting and functioning properly. What it's powering is the PCB which has the fuel gauge and a couple I2C devices.

    It's an ugly hack, but I'm on a deadline and this arrangement allows me to power the Espruino off an external USB battery pack.

About