'I am also wondering about the getBattery() function'
Hi @svansomeren, while I don't have practical experience with the Nordic Thingy52 device,
// Returns the state of the battery (immediately, or via callback) as { charging : bool, voltage : number }
Thingy.getBattery = function(callback) { ... } https://www.espruino.com/Thingy52
which closely mimics the response provided by nRF devices with batteries:
I'm trying to locate a user response that I read recently that seemed to imply this value is reliable down to around ~30%, which most likely is the point the manufacturer defines the point where battery voltage falls off. I also thought/felt this was for all nRF devices, although the internal docs imply otherwise. Still searching. . . . see notes to Gordon below
EDIT: Found it!
'currently we just convert the voltage linearly into battery percent, which works over most of the life of the battery' http://forum.espruino.com/conversations/343166/#comment15099263
The limitation on discharge was specifically for a LiPo
'and all the sensor data becomes available through your web bluetooth implementation'
There are six onboard sensors listed below the 'Features' heading and the corresponding functions to access them are listed below the 'On-board peripherals' heading. Any external sensor would need additional code that may be obtained by searching the tutorials for a specific sensor.
I'm not entirely sure how to make the documentation suggestion positively at the GitHub site.
Also,
Is there a reference page for the 'Thingy' library, or is it's instantiation and that limited documentation at the following link all that was intended?
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.
Wed 2020.02.26
Hi @svansomeren, while I don't have practical experience with the Nordic Thingy52 device,
which closely mimics the response provided by nRF devices with batteries:
I'm trying to locate a user response that I read recently that seemed to imply this value is reliable down to around ~30%, which most likely is the point the manufacturer defines the point where battery voltage falls off. I also thought/felt this was for all nRF devices, although the internal docs imply otherwise. Still searching. . . . see notes to Gordon below
There are six onboard sensors listed below the 'Features' heading and the corresponding functions to access them are listed below the 'On-board peripherals' heading. Any external sensor would need additional code that may be obtained by searching the tutorials for a specific sensor.
Note to @Gordon
The GitHub link currently points to an old offset
and should be ~1929
I'm not entirely sure how to make the documentation suggestion positively at the GitHub site.
Also,
Is there a reference page for the 'Thingy' library, or is it's instantiation and that limited documentation at the following link all that was intended?