You are reading a single comment by @Adam79 and its replies. Click here to read the full conversation.
  • and the code

    NRF.on('connect', function(addr) {
      digitalWrite(LED3,1);
      setTimeout(function () {
        digitalWrite(LED3,0);
      }, 750);
    });
    
    NRF.on('disconnect', function(addr) {
      digitalWrite(LED1,1);
      setTimeout(function () {
        digitalWrite(LED1,0);
      }, 750);
     }
    );
    
    NRF.setServices({
      0x1809 : { // Temp
      0x2A6E: {  // Temperature
       readable: true,
       value : [E.getTemperature().toFixed(2)]
    }},
      0x180F : { // Battery Service
      0x2A19: {  // Battery Level
        readable: true,
        value : [Puck.getBatteryPercentage().toFixed(0)]­
      }
     }
    });
    
About

Avatar for Adam79 @Adam79 started