-
• #2
Are you using up to date (1v92) firmware?
Also, the only time I've come across this before has been when the battery is almost flat - the main processor works fine but the magnetometer stops working slightly before the ARM has trouble.
Please could you check
Puck.getBatteryPercentage()
just to make sure? -
• #3
Says 1v88. Battery level is shown as 100, but I know that can't be true.
Is there a video for firmware updates using iOS? Watched the Android one, but the iOS app looks quite different.
-
• #4
Upgraded to 1v92. That fixed it.
-
• #5
Great! I'm afraid there isn't a video for iOS - I'll make a note to create one.
-
• #6
I reproduced this behavior with a flat battery showing 0 or 10 with E.getBattery(), not sure why the oscillation, but the magnetometer failed to record even though other components were still functional. Changing to a new battery brought the magnetometer back to life. firmware 1.99
-
• #7
Wed 2019.08.07
'not sure why the oscillation'
Basic physics, based on lack of sufficient voltage supplied.
See p.17 nominal voltage is 3v - device unpredictable below that level, especially the AD as it's readings are ratio-metric based on voltage reference
See 'Continuous Discharge Characteristics' graph in datasheet:
For this battery type, once voltage starts to fall off, functionality goes quickly.https://www.espruino.com/Reference#l_E_getBattery
"Note: this is an estimation only, based on battery voltage."The calculation
https://github.com/espruino/Espruino/blob/master/src/jswrap_espruino.c#L1745
Other discussions but for different board:
-
• #8
Thanks for the info! Ill read up, i suck at basic physics
-
• #9
Thanks for letting us know! I'll add a note to the docs.
By the time the magnetometer fails the battery is almost completely dead - it just happens that the microcontroller is a little better at eeking out the final few percent than the magnetometer is!
I'm using the magOn event to report magnetometer readings. As shown in the example for the Door Controlled Light, I defined a global variable zero and calibrate the sensor with the readings of an initial Puck.mag() call. However, when I try and use Puck.mag() out of the convenience of a setWatch function upon a button press, I get the above error message.
Can anyone tell me what's wrong here?
and I receive something like