语言

Menu
Sites
Language
Wrong Human Activity Monitor HRM values

Hey, I'm trying to retreave the HeartRate from HRM using:  

var HRUtils = {
    abc : function(){
        var count = 0;
        
         function onsuccessCB(heartInfo) {
             console.log("Rate: " + heartInfo.heartRate);
             
             count++;
             if(count >= 100){
                 tizen.humanactivitymonitor.stop("HRM");
             }
         }

         function onerrorCB(error) {
             alert("Erro!");
         }

         function onchangedCB(heartData) {
             tizen.humanactivitymonitor.getHumanActivityData("HRM", onsuccessCB, onerrorCB);
         }

         tizen.humanactivitymonitor.start("HRM", onchangedCB);
    }
};

 

But it works once at while and I have no idea why. Sometimes the output is totally correct (75, 73, 74... 80) and other times (0, 0, 0, 0...).

响应

2 回复
daniel kim

Hi,

In my test, HRM sensor need few seconds to get stable data from wrist and Gear S2 need to be attached well on wrist for testing.

Regards

Nafisul Islam Kiron

There is a sample app called "HeartRateMonitor" in Tizen IDE. You can try that too.

File >> New >> Tizen Web Project >> Online Sample >> HeartRateMonitor

Also there is this simple app too:

https://github.com/alycecil/TizenBeat