mirror of https://github.com/espruino/BangleApps
audio test
parent
4ab164b373
commit
c99d1d2be8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue