22 lines
437 B
Python
22 lines
437 B
Python
|
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||
|
#
|
||
|
# SPDX-License-Identifier: MIT
|
||
|
|
||
|
"""Example for Pico. Turns the built-in LED on and off with no delay."""
|
||
|
import board
|
||
|
import digitalio
|
||
|
import time
|
||
|
|
||
|
led = digitalio.DigitalInOut(board.LED)
|
||
|
led.direction = digitalio.Direction.OUTPUT
|
||
|
|
||
|
while True:
|
||
|
led.value = True
|
||
|
print("LED On")
|
||
|
time.sleep(1)
|
||
|
led.value = False
|
||
|
print("LED Off")
|
||
|
time.sleep(1)
|
||
|
|
||
|
|