heart rate sensor

edited May 2017 in Android Mode

hell-o world

i tried example in ketai library for measure heart rate value. i gave also body sensor permission, but it's not working.

what should i do..?

import ketai.sensors.*;

KetaiSensor sensor;

float heartrate = 0; boolean isStepDetectorAvailable = true ; boolean isStepCounterAvailable = true; boolean SENSOR_STATUS_UNRELIABLE=false; boolean SENSOR_STATUS_NO_CONTACT=false; void setup() { fullScreen(); sensor = new KetaiSensor(this); sensor.start(); sensor.list(); orientation(PORTRAIT); textAlign(CENTER, CENTER); textSize(30); sensor.enableHeartRateSensor();

} void draw(){ background(#7F0000); text(heartrate,width/2,height/2);

} public void mousePressed() { if (sensor.isStarted())
sensor.stop();
else{
sensor.start();
sensor.enableHeartRateSensor(); println("Sensor isStoped: " + sensor.isStarted()); }

} void onHeartRateEvent(float r){ heartrate= floor(r);
}

Answers

  • How much experience do you have with Processing? Have you run any other example or android code before?

    I suggest you open one of the provided examples and run it in your device before you start making your own application. Run the following examples: Gesture, gettingStartedCamera, accelerometer, gyroscope, multiple sensors and the UI example: http://ketai.org/examples/

    For reference: http://ketai.org/reference/sensors/ketaisensor/

    Don't forget to mention what Processing version are you using, as well as Android mode version, SDK version, API target and if you are trying it on an actual device. Also tell us if you have run applications on your phone before beside using ketai.

    Kf

  • oh thanks for reply. now i'm try that's example my processing version is 3.3.3, android mode is 4.0beta, sdk is 24.0.1 and i use my phone for testing, sometimes i just running test processing-android app in my phone.

  • @ddww

    So I tested Ketai and it doesn't work with android Mode V4.0beta7 but I confirm it is working with Android mode version 3.0.2

    I did the test on a Win10 machine and running Processing 3.3.3, target API 21.

    Kf

  • edited May 2017

    thanks for reply. now i'm using processing 3.3.3 version with4.0.8beta with target sdk25, my actual devices is huawei watch 1(android version 7.1.1) and target sdk24 devices galaxy s6 edge (android version 7.0.1). i wish i us window10 but my computers is mac(shit). i try to find reference of example , unfortunately it's not working always...

    you guys think is not working ?

    just heart rate sensor. the other sensors is work.

    thxkxxxx

    ++++ i also check adb, permission

Sign In or Register to comment.