• Thanks Gordon. I just tried but this does nothing (just displays Done! in the console). If I set the same value using the nrf app, the color is set to red.

    I believe the Puck can connect to the device, get the service and characteristic because I don't have any exception but the color is not modified when I write a value to the characteristic.

    function setLight() {
      var gatt;
      NRF.connect("AC:E6:4B:06:6F:CD").then(fu­nction(g) {
        gatt = g;
        return gatt.getPrimaryService("0000ff02-0000-10­00-8000-00805f9b34fb");
      }).then(function(service) {
        return service.getCharacteristic("0000fffc-0000­-1000-8000-00805f9b34fb");
      }).then(function(characteristic) {
        characteristic.writeValue([ 0x00, 0xFF, 0x00, 0x00 ]);
      }).then(function() {
        gatt.disconnect();
        console.log("Done!");
      });
    }
    
    setLight();
    
About

Avatar for pdominique @pdominique started