If you send binary data to Bangle.js over the UART connection, you can just read that out with Bluetooth.on('data', function(d) { too.
Bluetooth.on('data', function(d) {
The event returns a string, but it's easy enough to use E.toUint8Array: http://www.espruino.com/Reference#l_E_toUint8Array
Bluetooth.on('data', function(d) { const view = new DataView(E.toUint8Array(d).buffer); ... view.getInt16(0) });
@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.
If you send binary data to Bangle.js over the UART connection, you can just read that out with
Bluetooth.on('data', function(d) {
too.The event returns a string, but it's easy enough to use E.toUint8Array: http://www.espruino.com/Reference#l_E_toUint8Array