Hi Robin, I think @user109470 has got the hang of the JS side of things.
it recieves the sent data in evt, correct?
Yes, evt.data is in ArrayBuffer, so you can do new Uint8Array(evt.data) to get an array you can easily access from it.
evt.data
new Uint8Array(evt.data)
@Gordon started
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 Robin, I think @user109470 has got the hang of the JS side of things.
Yes,
evt.data
is in ArrayBuffer, so you can donew Uint8Array(evt.data)
to get an array you can easily access from it.