Once you've finished setting up your QT Py RP2040 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.

Upload the Code and Libraries to the QT Py RP2040

# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
# SPDX-License-Identifier: MIT

import board
import neopixel

from adafruit_led_animation.animation.rainbow import Rainbow
from adafruit_led_animation.animation.rainbowchase import RainbowChase
from adafruit_led_animation.animation.rainbowcomet import RainbowComet
from adafruit_led_animation.sequence import AnimationSequence

# Update to match the pin connected to your NeoPixels
pixel_pin = board.A0
# Update to match the number of NeoPixels you have connected
pixel_num = 96

pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.8, auto_write=False)

rainbow = Rainbow(pixels, speed=0.1, period=5)
rainbow_chase = RainbowChase(pixels, speed=0.03, size=24, spacing=4)
rainbow_comet = RainbowComet(pixels, speed=0.01, tail_length=50, bounce=True)

animations = AnimationSequence(
    rainbow,
    rainbow_comet,
    rainbow_chase,
    advance_interval=5,
    auto_clear=True,
)

while True:
    animations.animate()

After downloading the Project Bundle, plug your QT Py RP2040 into the computer's USB port. 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 QT Py RP2040's CIRCUITPY drive. 

  • lib folder
  • code.py

Your QT Py RP2040 CIRCUITPY drive should look like this after copying the lib folder and the code.py file.

This guide was first published on May 10, 2022. It was last updated on 2022-05-10 22:55:41 -0400.

This page (Code) was last updated on May 28, 2022.

Text editor powered by tinymce.