Created
February 9, 2022 06:42
-
-
Save jaylandro/08f8ea680611f9980d41df11f8995c74 to your computer and use it in GitHub Desktop.
QtPy Circuit Python M0 External LED Blink
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""CircuitPython Essentials Digital In Out example""" | |
import time | |
import board | |
from digitalio import DigitalInOut, Direction | |
# LED setup. | |
# For QT Py M0. QT Py M0 does not have a D13 LED, so you can connect an external LED instead. | |
led = DigitalInOut(board.SCK) | |
led.direction = Direction.OUTPUT | |
while True: | |
led.value = False | |
time.sleep(0.5) | |
led.value = True | |
time.sleep(0.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment