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

22 lines
318 B
Python

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
####