• Here is my code for the puck v2. The idea is that when the button is pressed, it sends info (the button count, the battery level and the z-axis value) to Node-Red so that Node-Red can react to the event.

        var pressCount = 0;
        var batt = 0;
        setWatch(function() {
          batt = Puck.getBatteryPercentage();
          var acc_gyro = Puck.accel();
          pressCount++;
          NRF.setAdvertising({
            0x1812 : [pressCount],
            0x180f : batt,
            0x1821 : acc_gyro.gyro.z
          });
        }, BTN, { edge:"rising", repeat:true, debounce:50 });
    

    So, kind of works, but then it keeps sending

    Here is the first batch of three data points (button count, power and z-axis):

    9/17/2020, 8:01:08 PMnode: b0afda13.2a2f68
    /ble/advertise/e9:1d:0b:37:51:d3/1812 : msg : Object
    object
    topic: "/ble/advertise/e9:1d:0b:37:51:d3/1812"
    payload: "[2]"
    qos: 0
    retain: false
    _topic: "/ble/advertise/e9:1d:0b:37:51:d3/1812"
    _msgid: "6c9a4099.d4036"
    
    9/17/2020, 8:01:32 PMnode: b0afda13.2a2f68
    /ble/advertise/e9:1d:0b:37:51:d3/180f : msg : Object
    object
    topic: "/ble/advertise/e9:1d:0b:37:51:d3/180f"
    payload: "[100]"
    qos: 0
    retain: false
    _topic: "/ble/advertise/e9:1d:0b:37:51:d3/180f"
    _msgid: "78d1d1f2.a0fc7"
    
    9/17/2020, 8:01:32 PMnode: b0afda13.2a2f68
    /ble/advertise/e9:1d:0b:37:51:d3/1821 : msg : Object
    object
    topic: "/ble/advertise/e9:1d:0b:37:51:d3/1821"
    payload: array[1]
    qos: 0
    retain: false
    _topic: "/ble/advertise/e9:1d:0b:37:51:d3/1821"
    _msgid: "99cb3105.e5c77"
    

    Here is the next batch exactly one minute later.

    9/17/2020, 8:02:08 PMnode: b0afda13.2a2f68
    /ble/advertise/e9:1d:0b:37:51:d3/1812 : msg : Object
    object
    topic: "/ble/advertise/e9:1d:0b:37:51:d3/1812"
    payload: "[2]"
    qos: 0
    retain: false
    _topic: "/ble/advertise/e9:1d:0b:37:51:d3/1812"
    _msgid: "ab42bd04.966bc"
    
    9/17/2020, 8:02:32 PMnode: b0afda13.2a2f68
    /ble/advertise/e9:1d:0b:37:51:d3/180f : msg : Object
    object
    topic: "/ble/advertise/e9:1d:0b:37:51:d3/180f"
    payload: "[100]"
    qos: 0
    retain: false
    _topic: "/ble/advertise/e9:1d:0b:37:51:d3/180f"
    _msgid: "bf8ee39f.9ff23"
    
    9/17/2020, 8:02:32 PMnode: b0afda13.2a2f68
    /ble/advertise/e9:1d:0b:37:51:d3/1821 : msg : Object
    object
    topic: "/ble/advertise/e9:1d:0b:37:51:d3/1821"
    payload: array[1]
    qos: 0
    retain: false
    _topic: "/ble/advertise/e9:1d:0b:37:51:d3/1821"
    _msgid: "f303b855.f82eb8"
    

    Am I missing something with this? I thought the puck would sleep until the next press.

    On a side note... it seems like there are RSSI messages very frequently. Do they use just a small bit of power?