• I've been wanting to increase the polling rate of the heart rate sensor but trying to increase the polling rate to 10ms results in the timing between the readings increasing and eventually the program will stop.
    Here is the reference of the options to increase the polling rate and the code we are running.
    http://www.espruino.com/ReferenceBANGLEJS2#l_Bangle_setOptions

    let i = 0;
    let t = 0;
    
    Bangle.on("HRM-raw",function(data){
     // print(data);
      if(i == 0){
        t = Date.now();
        print(t);
      }
      if(i % 10 == 0){
        n = Date.now();
        print(Date.now() - t);
        t = n;
      }
      i++;
    });
    Bangle.setOptions({"hrmGreenAdjust": false, "powerSave": true, "hrmSportMode":0, "hrmPollInterval": 10, "lockTimeout": 1000, "backlightTimeout":10000, "wakeOnBTN1": true, "wakeOnBTN2": true, "wakeOnBTN3": true, "wakeOnFaceUp": false, "wakeOnTouch": false, "wakeOnTwist": false});
    Bangle.setHRMPower(false);
    Bangle.setHRMPower(true);
    
About

Avatar for bponce02 @bponce02 started