timer-bar/examples/flash-onboard-led.py

22 lines
318 B
Python
Raw Normal View History

2022-10-03 01:03:44 +00:00
import time
import board
import digitalio
####
# Onboard LED
# Initialize
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
# Flash onboard LED every half second
while True:
led.value = True
time.sleep(0.5)
led.value = False
time.sleep(0.5)
# END Onboard LED
####