However the lightbulb I want to control expects hex values and I don't know how to write these values with writeValue(). In the nRF Connect app I have to send a byte array: 0x 00FF0000 for red or 0x 0000FF00 for green for instance.
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,
I'd like to control some BLE light bulbs with my Puck and I just read the following tutorial: https://www.espruino.com/Puck.js+and+BluÂetooth+Lightbulbs
However the lightbulb I want to control expects hex values and I don't know how to write these values with writeValue(). In the nRF Connect app I have to send a byte array: 0x 00FF0000 for red or 0x 0000FF00 for green for instance.
Any idea?