From 61788e1749545368fe54ea51c84c30fedd067fcf Mon Sep 17 00:00:00 2001 From: Kristin Galvin Date: Sun, 19 Jan 2020 18:00:14 -0800 Subject: [PATCH] audio test --- apps.json | 2 +- apps/stetho/stetho.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps.json b/apps.json index c83710a23..42a3ed03d 100644 --- a/apps.json +++ b/apps.json @@ -267,7 +267,7 @@ { "id": "stetho", "name": "Stethoscope", "icon": "stetho.png", - "version":"0.013", + "version":"0.014", "description": "Hear your heart rate", "tags": "health", "storage": [ diff --git a/apps/stetho/stetho.js b/apps/stetho/stetho.js index 4b83f0f84..664d320da 100644 --- a/apps/stetho/stetho.js +++ b/apps/stetho/stetho.js @@ -28,8 +28,9 @@ function readHRM() { } g.setColor(1,1,1); g.lineTo(x,y); - freq((Math.abs(a) * 100.0) + 500.0); - console.log("freq ", (a * 100.0) + 500.0); + freq((parseFloat(y) * 1000.0) + 500.0); + console.log("frequency ", (y * 1000.0) + 500.0; + ; if ((max-min)>0.005) { if (4*a > (min+3*max)) { // high g.setColor(1,0,0); @@ -78,4 +79,4 @@ function readHRM() { if (x>239)x=0; } -setInterval(readHRM,50); +setInterval(readHRM,100);