|
|
|
@ -35,13 +35,9 @@ switch = Debouncer(pin, interval=0.02) |
|
|
|
# Clean up any left over keypresses, sometimes they happen |
|
|
|
kbd.release_all() |
|
|
|
|
|
|
|
print("Starting program") |
|
|
|
print("Waiting for pedal input") |
|
|
|
while True: |
|
|
|
switch.update() |
|
|
|
if switch.rose: |
|
|
|
print("releasing button") |
|
|
|
kbd.release(keycodePress) |
|
|
|
if switch.fell: |
|
|
|
print("pressing button") |
|
|
|
kbd.press(keycodePress) |