Test Code
This code will light up the three pairs of LED strips in red, green, and blue. Use this code during the build to make sure all the strips are working and to help keep the strips together in the correct order during assembly.
You can access the code and necessary libraries by downloading the Project Bundle.
To do this, click on the Download Project Bundle button in the window below. It will download to your computer as a zipped folder.
# SPDX-FileCopyrightText: 2026 Erin St Blaine for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""Simple three-spoke DotStar color test using the adafruit_dotstar library."""
import time
import adafruit_dotstar
import board
NUM_PIXELS = 36
CLOCK_PIN = board.SCK
DATA_PINS = (board.A1, board.A2, board.A3)
COLORS = (
(255, 0, 0), # Red
(0, 255, 0), # Green
(0, 0, 255), # Blue
)
class SpokeDotStar(adafruit_dotstar.DotStar):
"""DotStar strip that keeps its pixels lit when its pins are released.
All three spokes share one clock pin, so only one strip can own the pins
at a time. The stock ``deinit`` blanks the strip before releasing the
pins; this version releases them and leaves the last colors showing.
"""
def deinit(self) -> None:
if self._spi:
self._spi.deinit()
else:
self.dpin.deinit()
self.cpin.deinit()
def write_dotstar(data_pin, color):
"""Fill one DotStar strip with a solid color."""
with SpokeDotStar(CLOCK_PIN, data_pin, NUM_PIXELS) as strip:
strip.fill(color)
while True:
for strip_pin, strip_color in zip(DATA_PINS, COLORS):
write_dotstar(strip_pin, strip_color)
time.sleep(1)
Upload the Code and Libraries to the RP2040 Prop-Maker Feather
After downloading the Project Bundle, plug your RP2040 Prop-Maker Feather into the computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called CIRCUITPY. Unzip the folder and copy the following items to the RP2040 Prop-Maker Feather's CIRCUITPY drive.
- lib folder
- code.py
Your RP2040 Prop-Maker Feather CIRCUITPY drive should look like this after copying the lib folder, and the code.py file.
If your strips have a different number of pixels than 36, or if you soldered to different pins, change the code here.
NUM_PIXELS = 36 CLOCK_PIN = board.SCK DATA_PINS = (board.A1, board.A2, board.A3)
Page last edited September 16, 2026
Text editor powered by tinymce.