Actually a good one is setBusyIndicator(D8) which is the backlight. It'll then light the backlight whenever the Bangle is doing something.
Generally if you actually see it flashing once a second on the clock, it's something that'll end up using a reasonable amount of power (so ~1 week battery rather than a month)
edit: interestingly it is possible to look at SysTick (peek32(0xE000E018)) to keep an eye on CPU usage, but since CPU draws ~4mA, and the screen draws 60 (IIRC) even if you could get an accurate CPU usage percentage it's not the full story.
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.
Actually a good one is
setBusyIndicator(D8)
which is the backlight. It'll then light the backlight whenever the Bangle is doing something.Generally if you actually see it flashing once a second on the clock, it's something that'll end up using a reasonable amount of power (so ~1 week battery rather than a month)
edit: interestingly it is possible to look at SysTick (
peek32(0xE000E018)
) to keep an eye on CPU usage, but since CPU draws ~4mA, and the screen draws 60 (IIRC) even if you could get an accurate CPU usage percentage it's not the full story.