adding a neopixel ring to the black adafruit feather rp2040

Two posts back I wrote about adding a NeoPixel stick with eight NeoPixels to the Black Adafruit Feather RP2040. In this quick post I take the code from the Feather STM32 driving the NeoPixel stick and quickly “port” it to the Feather RP2040 driving a NeoPixel ring with 12 NeoPixel LEDs. Both Feathers are running their specific version of Circuit Python version 7.1.1. The story behind how I acquired the NeoPixel ring is interesting. One day last year, while visiting the Parallax website ( ) I came across a sale of a mystery box of components (Adafruit has the equivalent). So I bit and bought one, just to see what I’d get. When the mystery box arrived it had a lot of interesting components, one of which was the NeoPixel ring. I had no use for the ring at the time and put it back in the box and put the box on the shelf with a lot of other boxes with components I keep in case… Forward six months or so and I came across a sale of the NeoPixel sticks, so I bought one along with the STM32 Feather.

Today as I was cleaning and reorganizing I came across that mystery box and remembered I had the NeoPixel ring in it. I pulled it out, soldered some wires to it, plugged it into the Feather RP2040 using the same pins as with the Feather STM32 and copied the STM32’s code over to the RP2040. I had to make two changes to one line of code at line 14:

  1. Change the number of NeoPixel LEDS from 8 to 12, and
  2. Change the NeoPixel type from neopixel.GRBW to neopixel.GRB because there is no white on the NeoPixel ring.

Once that was done the behavior of the NeoPixel ring was essentially identical with the NeoPixel stick.

import time
import board
import neopixel
# For the single neopixel on the feather itself.
sneopixel = neopixel.NeoPixel(
    board.NEOPIXEL, 1, brightness=0.2, auto_write=False, pixel_order=neopixel.GRB
# For the eight neopixel board attached to the feather.
pixelboard = neopixel.NeoPixel(
    board.D5, 12, brightness=0.2, auto_write=True, pixel_order=neopixel.GRB
def cycleColor(color):
    for i in range(len(pixelboard)):
        pixelboard[i-1] = (0,0,0,0) # turn LED off
        pixelboard[i] = color
while True:
    cycleColor((64,0,0,0)) # red
    cycleColor((0,64,0,0)) # green
    cycleColor((0,0,64,0)) # blue
    cycleColor((64,16,0,0)) # orange
    cycleColor((0,32,32,0)) # cyan
    cycleColor((0,0,0,0)) # black (LED off)

And once again the video clip was made with my iPhone 11 Pro, and it’s as crappy as the last one. I will work diligently to learn how to do a much better job of videoing these types of devices. They look far better in person.