Look at the object from hrm-raw event. I noticed in halemmerich's code that he logs also e.vcPPG. I wonder how this value differs from raw.
I conclude that hrm.raw is the sum of the e.vcPPG and e.vcPPGoffs, then multiplied by 2.
proof:
int v = vcInfo.ppgValue + vcInfo.ppgOffset;
if (vcType == VC31B_DEVICE)
v <<= 1; // on VC31B the PPG doesn't vary as much with pulse so try and bulk it up here a bit
hrmCallback(v);
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.
Look at the object from
hrm-raw
event. I noticed in halemmerich's code that he logs alsoe.vcPPG
. I wonder how this value differs fromraw
.I conclude that
hrm.raw
is the sum of thee.vcPPG
ande.vcPPGoffs
, then multiplied by 2.proof: