@MaBe, many thanks for those examples. Really helpful. Worked second time of asking. Weirdly copy / pasting into nano and uploading via CLI on Raspberry resulted in the error below which seen before but luckily the example was easy to retype.
I don't have access to bluefruit but was then able to test the code using the bluez command gatttool to query the characteristic 0x2A6E which responded with '31 39 2e 32 35' which is 19.25 in ascii. The puck was in the warm so it is a sensible result. (This puck stopped working after it got to a temperature of -32 degrees in my freezer but has now recovered)
This is gatttool in action:
pi@raspberrypi:~/puck $ gatttool -I -b F2:91:92:05:39:CE -t random
Attempting to connect to F2:91:92:05:39:CE
[F2:91:92:05:39:CE][LE]> char-read-uuid 0x2A6E
handle: 0x0013 value: 31 39 2e 32 35
Here is the error encounted after cut/pasting the code.
Acorn parse for plugins/compiler.js failed.<br/>Check the editor window for syntax errors
ReferenceError: utf8 is not defined
at escapeChar (eval at loadJS (/usr/lib/node_modules/espruino/index.js:10:10), <anonymous>:44:5)
© Espruino, powered by microcosm.
Report a problem