micropython/examples/hwapi/button_led.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
180 B
Python
Raw Normal View History

import utime
from hwconfig import LED, BUTTON
# Light LED when (and while) a BUTTON is pressed
while 1:
LED.value(BUTTON.value())
# Don't burn CPU
utime.sleep_ms(10)