You are reading a single comment by @psc1988 and its replies. Click here to read the full conversation.
  • Hi Gordon,

    so I just get zeros as values. I tried it with the hex code 0x04 (attention level).
    In the documentation in the link below I saw there are also a hex code to enable the outputs but I don´t konw how to integrate that into the espruino program.

    I added var buf = 0x04 in the code.

    Found this documentation on the thinkgear website with the codes:­php?id=thinkgear_communications_protocol­#data_payload

    var buf = 0x04 ;
    var gatt,characteristic;
    setWatch(function(e) {
    NRF.requestDevice({ filters: [{ adress: 'c4:64:e3:e8:d6:e9' }] }).then(function(device) {
      return device.gatt.connect();
    }).then(function(g) {
      gatt = g;
      return gatt.getPrimaryService(
    }).then(function(service) {
      return service.getCharacteristic(
    }).then(function (c) {
      console.log("Got Characteristic");
      characteristic = c;
      characteristic.on('characteristicvaluech­anged', function(event) {
      return characteristic.startNotifications();
    }).then(function() {
          }, BTN, { repeat: true, edge: 'rising' });
    function processBrainData(buf) {
      var d = new Uint8Array(16);
      setInterval(function() {
      print(d.slice().map(x=>x.toString(16).pa­dStart(2,0)).join(" "));
    }, 500);

Avatar for psc1988 @psc1988 started