makeybutton: revise to better match the algorithm defined by the original

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2022-09-14 14:54:13 +02:00
committed by Ron Evans
parent 7396a5be43
commit 0ea72e7f1e
3 changed files with 81 additions and 47 deletions
+3 -2
View File
@@ -9,7 +9,7 @@ import (
var (
led machine.Pin = machine.LED
button machine.Pin = machine.BUTTON
button machine.Pin = machine.D10
key *makeybutton.Button
)
@@ -25,6 +25,7 @@ func main() {
case makeybutton.Released:
led.Low()
}
time.Sleep(100 * time.Millisecond)
// the more frequent the more responsive
time.Sleep(50 * time.Millisecond)
}
}