You could try changing gat.getPrimaryService("0xFF02") to gat.getPrimaryService(0xFF02) (and the same for the characteristic too) - I'm not 100% sure but that might make some difference.
What you're doing with Uint8Array sounds fine, but then "\x00\xFF\x00\x00" or even just [0,255,0,0] should work as well.
And if you do the same from an app like nRF connect, you can change the light's colour?
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.
You could try changing
gat.getPrimaryService("0xFF02")
togat.getPrimaryService(0xFF02)
(and the same for the characteristic too) - I'm not 100% sure but that might make some difference.What you're doing with Uint8Array sounds fine, but then
"\x00\xFF\x00\x00"
or even just[0,255,0,0]
should work as well.And if you do the same from an app like
nRF connect
, you can change the light's colour?