Hi, that's great. What I'd suggest is to maybe try this and see if it works:
...
}).then(function(service) {
return service.getCharacteristic(
"039afff8-2c94-11e3-9e06-0002a5d5c51b");
}).then(function (c) {
console.log("Got Characteristic");
characteristic = c;
characteristic.on('characteristicvaluechanged', function(event) {
processBrainData(event.target.value.buffer);
});
return characteristic.startNotifications();
}).then(function() {
console.log("Connected.");
});
function processBrainData(buf) {
var d = new Uint8Array(buf);
print(d.slice().map(x=>x.toString(16).padStart(2,0)).join(" "));
}
At least then you should get a hex dump whenever the data changes. Maybe you could post the results up here and it might give us some idea of how to pull the data out.
Do you have a link to the Arduino forum? Did they give any hints about how to decode the data?
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's great. What I'd suggest is to maybe try this and see if it works:
At least then you should get a hex dump whenever the data changes. Maybe you could post the results up here and it might give us some idea of how to pull the data out.
Do you have a link to the Arduino forum? Did they give any hints about how to decode the data?