From e949bfb3be96a6a5947dd8360d68fcf09e3fb85c Mon Sep 17 00:00:00 2001 From: Kristin Galvin Date: Sun, 19 Jan 2020 20:39:58 -0800 Subject: [PATCH] audio test --- apps.json | 2 +- apps/stetho/stetho.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps.json b/apps.json index 71e26dd85..56d674210 100644 --- a/apps.json +++ b/apps.json @@ -267,7 +267,7 @@ { "id": "stetho", "name": "Stethoscope", "icon": "stetho.png", - "version":"0.0193", + "version":"0.0194", "description": "Hear your heart rate", "tags": "health", "storage": [ diff --git a/apps/stetho/stetho.js b/apps/stetho/stetho.js index 52e3eea3b..badd3f935 100644 --- a/apps/stetho/stetho.js +++ b/apps/stetho/stetho.js @@ -12,7 +12,7 @@ var SPEAKER_PIN = D18; function freq(f) { console.log("frequency: ", f); if (f===0) digitalWrite(SPEAKER_PIN, 0); - else analogWrite(SPEAKER_PIN, 0.9, {freq: f}); + else analogWrite(SPEAKER_PIN, 0.5, {freq: f}); } function readHRM() { @@ -25,7 +25,7 @@ function readHRM() { g.clearRect(0,100,239,239); g.moveTo(-100,0); } - let frequency = parseFloat(((170 - (a*960*4))*100) + 200); + let frequency = parseFloat(((170 - (a*960*4))*60) + 200); if(frequency > 0) freq(frequency); g.setColor(1,1,1);