This example uses the Adafruit’s digitalio package to create a DigitalInOut object.
The LED should blink with on and off times of a half second.
import time import board import digitalio led = digitalio.DigitalInOut(board.IO0) led.direction = digitalio.Direction.OUTPUT while True: led.value = True time.sleep(0.5) led.value = False time.sleep(0.5)
Page last edited March 08, 2024
Text editor powered by tinymce.