micropython/tests/pyb/switch.py

7 wiersze
87 B
Python

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