Health Thermometer org.bluetooth.service.health_thermometer 0x1809
It matches your example in docs. From what I can tell 0x2A1C is a code for "temperature measurement", while 0x1809 is the code for the "health thermometer" service as a whole. Not sure if the NRF library we're using even has a notion of those formats, or is it up for us to provide an implementation.
The issue is with the EspruinoHub's decoding. It's doing something pretty simple right now - 8 bit is interpreted as-is, and 16 bit is the temperature x100
Hmm... it seems that you're bitshifting the second value ((((a[1]<<8)+a[0])/100)), which makes it hard for me to reverse it.
How would you encode a 16 bit float to this that would work on puck (i'm assuming its BE)?
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.
GATT docs list that as:
It matches your example in docs. From what I can tell
0x2A1C
is a code for "temperature measurement", while0x1809
is the code for the "health thermometer" service as a whole. Not sure if the NRF library we're using even has a notion of those formats, or is it up for us to provide an implementation.Hmm... it seems that you're bitshifting the second value (
(((a[1]<<8)+a[0])/100)
), which makes it hard for me to reverse it.How would you encode a 16 bit float to this that would work on puck (i'm assuming its BE)?