• What happened after my last reply 1 month ago? Did it turn out just to be a dead battery?

    What worries me is there's a pretty regular dip on battery voltage (twice a day?) that makes it seem like some code is running that's using up the battery. Of course it could just be the temperature of the cell affecting it, but if so you'd expect it to repeat once a day, not twice.

    The overall shape of the graph is what you'd expect - the percentage from getBatteryPercentage is pretty crude and is based off the battery voltage. It varies depending on manufacturer so it's not accurate, but when the battery gets mostly flat the voltage tends to drop off a cliff (google images for 'cr2032 discharge curve') and Puck.js doesn't take account of that in the calculations.

    Is it possible that you have some PC or phone that is attempting to connect to the device? if you have no code on there then that is one option - having a connection open wakes the device up ~25 times a second which really hurts the power consumption, and can run it down in a matter of days.

    There's some info on stopping unwanted connections here: http://www.espruino.com/Puck.js+Security­

    But if it's not responding at all - given the troubles so far - I'd suggest trying another battery. Maybe the batch of replacement batteries you got are a bit dodgy. Doing the 5 blink reset will erase flash which uses a lot of battery power, so if it was low on battery than that could have pushed it over the edge.

About

Avatar for Gordon @Gordon started