• Yes, you can send them all together if you want...

    var myState = 0;
    
    function getMyData() {
      return [E.getTemperature(),Puck.light()*256, Puck.getBatteryPercentage(),myState];
    }
    
    NRF.setServices({
      0x1234 : {
        0x5678 : {
          value :  getMyData(),  readable : true
        }
      }
    });
    setInterval(function() {
      NRF.updateServices({
        0x1234 : {
          0x5678 : {
           value : getMyData()
          }
        }
      });
    }, 60000);
    

    And then you can just unpack them at the other end.

    Although this post was originally about standard services/characteristics. If you're sending stuff like that then what you've got definitely isn't a standard service and you'll probably want to look at using your own 128 bit UUIDs for it.

About

Avatar for Gordon @Gordon started