Adafruit_Learning_System_Gu.../Introducing_CircuitPlaygroundExpress/CircuitPlaygroundExpress_Blinky/code.py
2022-02-23 14:26:51 -05:00

19 lines
520 B
Python

# SPDX-FileCopyrightText: 2017 John Edgar Park for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# CircuitPlaygroundExpress_Blinky
import time
import board
import digitalio
led = digitalio.DigitalInOut(board.D13) # defines the variable 'led'
led.direction = digitalio.Direction.OUTPUT # set the pin as output
while True: # code below this point loops over and over
led.value = True # turn on the LED
time.sleep(0.5) # pause
led.value = False # turn off the LED
time.sleep(0.5) # pause