• Hi, I think all you need is to make sure you keep setting everything you want advertised in setAdvertising. So for example:

    var buttonState = 0;
    
    function updateBLE() {
      NRF.setAdvertising({
        0x1809 : E.getTemperature(),
        0x180F : E.getBattery(),
        0xFFFF : [buttonState]
     }, {interval: 500});
    }
    
    updateBLE();
    setWatch(function() {
        buttonState = !buttonState;
        digitalWrite(LED2, buttonState);
        updateBLE();
    }, BTN1, { repeat:1, edge:"rising", debounce: 20 });
    

    Worth adding that when you call setAdvertising, the values of battery/temp are set at the point that setAdvertising was called, so if you want them to update, you'll need to call it again every few minutes with setInterval

About

Avatar for Gordon @Gordon started