On mine, if the watch is on its back I see it reporting 1 when there's nothing there (eg the green LED ends up being off) and 0 when I get my hand close to the sensor. If I shine a torch at it or point it towards the window, the value rises.
For that you have to manually configure the sensor to run faster and to turn off the green LED:
Bangle.setOptions({hrmPollInterval:5});
Bangle.setHRMPower(1);
Bangle.setOptions({hrmGreenAdjust:false, hrmWearDetect:false, hrmPushEnv:true});
Bangle.hrmWr(0x10, 197&0xF8 | 4); // just SLOT2
Bangle.hrmWr(0x16, 0); // force env to be used as fast as possible
Bangle.on('HRM-env', function(env) {
console.log(env);
});
So then it'll run nice and fast (200Hz in that case) and you could use it for some kind of sensing or communication
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
On mine, if the watch is on its back I see it reporting
1
when there's nothing there (eg the green LED ends up being off) and0
when I get my hand close to the sensor. If I shine a torch at it or point it towards the window, the value rises.The real use it for something like the flash counter though: https://banglejs.com/apps/?id=flashcount
For that you have to manually configure the sensor to run faster and to turn off the green LED:
So then it'll run nice and fast (200Hz in that case) and you could use it for some kind of sensing or communication