• Ok,

    • Put this on Puck.js:

      function updateAdv() {
      var data = [Puck.light()*255, Math.round(E.getTemperature())];
      NRF.setAdvertising({},{manufacturer: 0x0590, manufacturerData:data});
      }
      updateAdv(); // start off right now
      setInterval(updateAdv, 30000); // update every 30 seconds
      
    • Disconnect from Puck.js, so it starts Advertising

    • Run nRF Connect

    • Go to the Scanner tab, click Scan in the top right

    • Find your Puck.js device, and tap on it (not on the connect button, just the text)

    • In the data there, you should see 'Manufacturer data', a company ID 0x0590, and a hex code like 0xCA14.

    • In 0xCA14, 0xCA is the light value (between 0 and 255) and 0x14 is the temperature in degrees C

    Hopefully when that works, you can start to figure out about writing your own Android app to receive the data too.

About

Avatar for Pzr0 @Pzr0 started