Where are you getting your power consumption figures from? On http://www.espruino.com/Puck.js#power-consumption the figure I measured for advertising off and watching the button for a press was 12uA - so that's around 2 years of battery life (and that figure should have improved with newer firmwares).
... or if you're not actively watching the button input with setWatch (eg, just checking it every 30 seconds), it's 3uA, which is realistically the shelf life of the battery.
I don't think the power off state you're after is actually possible - since even if the CPU were off, the GPIO for responding to button presses stuff draws some power. Also, the box isn't sturdy enough to stop the button being pressed in transit, so you'd need some way of making sure that it only powered up when the button was pressed intentionally.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi Bill,
Where are you getting your power consumption figures from? On http://www.espruino.com/Puck.js#power-consumption the figure I measured for advertising off and watching the button for a press was 12uA - so that's around 2 years of battery life (and that figure should have improved with newer firmwares).
... or if you're not actively watching the button input with setWatch (eg, just checking it every 30 seconds), it's 3uA, which is realistically the shelf life of the battery.
I don't think the power off state you're after is actually possible - since even if the CPU were off, the GPIO for responding to button presses stuff draws some power. Also, the box isn't sturdy enough to stop the button being pressed in transit, so you'd need some way of making sure that it only powered up when the button was pressed intentionally.