Most CircuitPython boards have an LED built into the board, which makes testing very easy! Create a blank document named code.py in the CIRCUITPY
drive.
Open the file with your editor of choice (e.g. Notepad on Windows, TextEdit on macOS), and enter the following code:
import board
import digitalio
import time
pin_name = board.L
led = digitalio.DigitalInOut(pin_name)
led.direction = digitalio.Direction.OUTPUT
while True:
led.value = True
time.sleep(0.1)
led.value = False
time.sleep(0.1)
Note! You might have to change board.L
to another value. Find your board in the list below to see which value you should use.
-
Adafruit Feather M0 Basic Proto:
board.D13
-
Arduino MKR Zero:
board.L
-
SparkFun SAMD21 Dev Breakout:
board.LED
-
SparkFun SAMD21 Mini Breakout:
board.LED
Save the program. Your board should reset automatically, and the onboard LED should begin blinking rapidly.
If you see the LED flashing, you know that CircuitPython is up and running on your board!
Page last edited March 08, 2024
Text editor powered by tinymce.