Hey again! :-)
This time, it's about Puck.getBatteryPercentage().
I've got two pucks, purchased together. One is showing a steady 100% battery at all measurements (calls to getBatteryPercentage()), the other one is fluctuating up to 15%. Measurements are made every 30s, the code is the same, no connections, only BLE advertisements.
Here's how it looks like on a 12h graph:
Try to switch the batteries, to see if it make any difference.
The battery level is only really a rough pointer - it works from the voltage, which can fluctuate a bit based on temperature or whether there's been some high power draw recently (like radio transmit, a LED lit up, or even the amount of code executed before the call to getBatteryPercentage).
I'm surprised it varies by as much as you're seeing - but if you were using it with the LEDs on, that'd definitely do it.
I guess it's possible that one Puck's battery is full enough that it's still effectively 'above' what would be considered 100%, so you see no changes - while the other one isn't.
Is the 'constant 100%' Puck the same one that was reporting a constant 19 degrees C? Maybe you could check with something like nRF Connect to make sure that it's not your code that's receiving advertisements that has an issue, rather than the Puck itself.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem