circuitpython/tests/pyb/switch.py

7 lines
87 B
Python

from pyb import Switch
sw = Switch()
print(sw())
sw.callback(print)
sw.callback(None)