Hi - that sounds like a good plan. I think what happens is that once you supply data to setAdvertising on the Puck, it's transmitted as a series of bytes regardless of how it was defined in JS.
Looks like it's being interpreted as a series of hexadecimal digits. If you've got "0000050f" then you should just be able to do msg.payload = parseInt(JSON.parse(msg.payload),16) in a 'function block' in node-red to get the number you want.
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.
Hi - that sounds like a good plan. I think what happens is that once you supply data to
setAdvertising
on the Puck, it's transmitted as a series of bytes regardless of how it was defined in JS.Looks like it's being interpreted as a series of hexadecimal digits. If you've got
"0000050f"
then you should just be able to domsg.payload = parseInt(JSON.parse(msg.payload),16)
in a 'function block' in node-red to get the number you want.