You are reading a single comment by @solick and its replies. Click here to read the full conversation.
  • Hi,

    i am playing around with the BLE Advertising. It seams to be a little bit unstable.

    First: When connected to the Web IDE, Advertising don´t work at all for me. You need to disconnect to test it. Is this by design or a bug?

    Second: Button Press is not catched precisely.

    i use the following code:

    var pressCount = 0;
    setWatch(function() {
      pressCount++;
      NRF.setAdvertising({
        0xFFFF : [pressCount]
      });
    }, BTN, { edge:"rising", repeat:false, debounce:50 });
    

    Setting repeat to true causes on some pucks to repeatingly advertise the counter, on others to only adverstise the counter when button is pressed.

    Third: Different Intervals

    I set two advertisements within an interval of 3 seconds but the information are advertised in different intervals:

    setInterval(function() {
      NRF.setAdvertising({
        0x2a01 : [String(E.getTemperature())],
        0x2a19 : [String(Puck.getBatteryPercentage())]  
      });
    }, 3000);
    

    Temperature is advertised every 3s but BatteryPercentage every 1-5 seconds (this vary a bit).

    Does anyone has some ideas?

    Kind regards

    solick

About

Avatar for solick @solick started