I'm afraid you can't easily do the check 'in hardware' - it is possible to a very limited extent, but it's not very flexible.
Checking Puck.light should be fine - every second it's not likely to have a massive effect on power consumption at all, although I wouldn't advise doing it much more often than that
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!
I'm afraid you can't easily do the check 'in hardware' - it is possible to a very limited extent, but it's not very flexible.
Checking
Puck.light
should be fine - every second it's not likely to have a massive effect on power consumption at all, although I wouldn't advise doing it much more often than that