Below are some power measurements (current @ 3V) of the Puck.js programmed using this code made using my NORDIC Power Profiler Kit II:
Current shape when switching from being connected to the IDE to restarting the BLE stack to act as a beacon
Average current consumption of the beacon over a minute ~ 6.30uA
Average current and shape of the beacon while sleeping ~2.10uA
Average current while broadcasting ~ 2.91mA
TL;DR
The Puck.js running this code is very energy efficient:
According to those readings, the average power consumption is 6.30uA which makes a 3V CR2032 230mAh battery last more than 4 years:
230/0.00630 = 36507 hours = 1521 days = 4.16 years
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.
Below are some power measurements (current @ 3V) of the Puck.js programmed using this code made using my NORDIC Power Profiler Kit II:
Current shape when switching from being connected to the IDE to restarting the BLE stack to act as a beacon
Average current consumption of the beacon over a minute ~ 6.30uA
Average current and shape of the beacon while sleeping ~2.10uA
Average current while broadcasting ~ 2.91mA
TL;DR
The Puck.js running this code is very energy efficient:
According to those readings, the average power consumption is 6.30uA which makes a 3V CR2032 230mAh battery last more than 4 years:
230/0.00630 = 36507 hours = 1521 days = 4.16 years