I currently have this MicroPython code running on a Pyboard v1.1:
import pyb
def toggle_led():
pyb.LED(3).toggle()
sw = pyb.Switch()
sw.callback(toggle_led)
However, this setup is susceptible to contact bounce.
I tried adding up to pyb.delay(500)
to no avail.
Is there an elegant way to remedy USR
switch bounce on the Pyboard?