Once you've finished setting up your Feather RP2040 Scorpio with CircuitPython, 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 as a zipped folder.

# SPDX-FileCopyrightText: 2023 Jeff Epler for Adafruit Industries
# SPDX-License-Identifier: MIT
import board
from adafruit_led_animation.animation.chase import Chase
from adafruit_led_animation.animation.comet import Comet
from adafruit_led_animation.animation.rainbow import Rainbow
from adafruit_led_animation.color import (JADE, RED, WHITE)
from adafruit_led_animation.group import AnimationGroup
from adafruit_led_animation.sequence import AnimationSequence
from adafruit_neopxl8 import NeoPxl8
from adafruit_pixelmap import PixelMap

strand_length = 30
pixel_brightness = 0.8
num_strands = 8

num_pixels = num_strands * strand_length
pixels = NeoPxl8(board.NEOPIXEL0, num_pixels, auto_write=False, brightness=pixel_brightness)

def strand(n):
    return PixelMap(
        tuple(range(n * strand_length, (n + 1) * strand_length)),

pixel_strip_A = strand(0)
pixel_strip_B = strand(1)
pixel_strip_C = strand(2)
pixel_strip_D = strand(3)
pixel_strip_E = strand(4)
pixel_strip_F = strand(5)
pixel_strip_G = strand(6)
pixel_strip_H = strand(7)

animations = AnimationSequence(
        Rainbow(pixel_strip_A, speed=0.01, period=7),
        Rainbow(pixel_strip_B, speed=0.01, period=7),
        Rainbow(pixel_strip_C, speed=0.01, period=7),
        Rainbow(pixel_strip_D, speed=0.01, period=7),
        Rainbow(pixel_strip_E, speed=0.01, period=7),
        Rainbow(pixel_strip_F, speed=0.01, period=7),
        Rainbow(pixel_strip_G, speed=0.01, period=7),
        Rainbow(pixel_strip_H, speed=0.01, period=7),
        Chase(pixel_strip_A, speed=0.05, color=WHITE, spacing=5, size=8),
        Chase(pixel_strip_B, speed=0.05, color=RED, spacing=4, size=4),
        Chase(pixel_strip_C, speed=0.05, color=RED, spacing=4, size=8),
        Chase(pixel_strip_D, speed=0.05, color=JADE, spacing=5, size=5),
        Chase(pixel_strip_E, speed=0.05, color=WHITE, spacing=5, size=5),
        Chase(pixel_strip_F, speed=0.05, color=RED, spacing=4, size=5),
        Chase(pixel_strip_G, speed=0.05, color=JADE, spacing=3, size=4),
        Chase(pixel_strip_H, speed=0.05, color=RED, spacing=4, size=8),
        Comet(pixel_strip_A, 0.01, color=WHITE, tail_length=12, bounce=True),
        Comet(pixel_strip_B, 0.01, color=RED, tail_length=12, reverse=True),
        Comet(pixel_strip_C, 0.01, color=RED, tail_length=12, bounce=True),
        Comet(pixel_strip_D, 0.01, color=JADE, tail_length=12, reverse=True),
        Comet(pixel_strip_E, 0.01, color=WHITE, tail_length=12, bounce=True),
        Comet(pixel_strip_F, 0.01, color=RED, tail_length=12, reverse=True),
        Comet(pixel_strip_G, 0.01, color=JADE, tail_length=12, bounce=True),
        Comet(pixel_strip_H, 0.01, color=RED, tail_length=12, reverse=True),

while True:

Upload the Code and Libraries to the Feather RP2040 Scorpio

After downloading the Project Bundle, plug your Feather RP2040 Scorpio 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 folder and file to the Feather RP2040 Scorpio's CIRCUITPY drive.

  • /lib
  • code.py

Copy the entire lib folder, including all of its contents.

Your Feather RP2040 Scorpio CIRCUITPY drive should resemble the following after copying the lib folder and the code.py file.

This guide was first published on Jan 31, 2023. It was last updated on Jan 31, 2023.

This page (Coding the Holiday Tree) was last updated on Mar 24, 2023.

Text editor powered by tinymce.