Code: Select all
import pyb
def toggle_led():
pyb.LED(3).toggle()
pyb.Switch().callback(toggle_led)
I tried adding a pyb.delay(500) to no avail.
Is there some elegant way to remedy switch bounce on the Pyboard?
PS: There are also points to be gained over on https://stackoverflow.com/q/47479907/2192488