audio test

pull/80/head
Kristin Galvin 2020-01-19 17:12:21 -08:00
parent 4ab164b373
commit c99d1d2be8
1 changed files with 5 additions and 4 deletions

View File

@ -13,12 +13,13 @@ function freq(f) {
if (f===0) digitalWrite(SPEAKER_PIN, 0);
else analogWrite(SPEAKER_PIN, 0.5, {freq: f});
}
freq(1000);
function readHRM() {
freq(1000);
freq(1500);
freq(0);
function readHRM() {
var a = analogRead(D29);
var h = getTime();
min=Math.min(min*0.97+a*0.03,a);