l0oks like it needs to feed calc_ess periodically, the event on change would probably not give you such regular timing. Anyway interval doing such math every 80ms can drain a battery but looks like it run for max. 30 minutes before sceduled alarm so may not drain too much. also it never stops that 80ms interval (relying on load() to clean up?)
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.
l0oks like it needs to feed
calc_ess
periodically, the event on change would probably not give you such regular timing. Anyway interval doing such math every 80ms can drain a battery but looks like it run for max. 30 minutes before sceduled alarm so may not drain too much. also it never stops that 80ms interval (relying on load() to clean up?)