diff --git a/apps.json b/apps.json index b849820e7..75bebe919 100644 --- a/apps.json +++ b/apps.json @@ -267,7 +267,7 @@ { "id": "stetho", "name": "Stethoscope", "icon": "stetho.png", - "version":"0.019", + "version":"0.0191", "description": "Hear your heart rate", "tags": "health", "storage": [ diff --git a/apps/stetho/stetho.js b/apps/stetho/stetho.js index 0059fd43e..10891fb75 100644 --- a/apps/stetho/stetho.js +++ b/apps/stetho/stetho.js @@ -10,7 +10,7 @@ var hrm; var SPEAKER_PIN = D18; function freq(f) { - console.log("frequency : ", f); + console.log("frequency: ", f); if (f===0) digitalWrite(SPEAKER_PIN, 0); else analogWrite(SPEAKER_PIN, 0.5, {freq: f}); } @@ -25,7 +25,7 @@ function readHRM() { g.clearRect(0,100,239,239); g.moveTo(-100,0); } - let frequency = parseFloat(y+1.0) * 10000; + let frequency = parseFloat((170 - (a*960*4)) + 500); if(frequency > 0) freq(frequency); g.setColor(1,1,1);