Hi community,
I develop my first clock face and I have my first problem: I display the heart rate on my clockface, but when I take off my watch, the api return the same last value indefinitely.
My code :
let hrm = new HeartRateSensor();
hrm.start();
function updateClock(evt) {
hrLabel.text = hrm.heartRate != null ? hrm.heartRate : "--";
}
clock.ontick = function(evt) {
updateClock(evt);
}
Any solution for that ?
Answered! Go to the Best Answer.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
You can use the timestamp to check the age of the last reading.
You can see an example here: https://github.com/Fitbit/sdk-moment/blob/master/app/simple/hrm.js
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
You can use the timestamp to check the age of the last reading.
You can see an example here: https://github.com/Fitbit/sdk-moment/blob/master/app/simple/hrm.js