I figured the ring was defective. I ordered another one and, it does the same thing. I must be doing something wrong.
Things I have tried with the same result:
- Different pins on the board for the data, using both the A and D names for them (D3, D4, D2, D1, A1, A0)
- Powering from an external power supply (4.89v, with a ground between the ring and the board’s GND pin)
- Powering from the board using the USB and GND pins
- Providing only 3 parameters to pixels.fill (e.g. pixels.fill((0,255,0)) instead of pixels.fill((0,255,0,0)) )
- Connecting leads directly to the pins to eliminate the breadboard
- Different test leads
- Different Neopixel ring
I am not sure what to try next. Any suggestions?
The code I am using is the most simplified version of something from the tutorials:
Code: Select all
import time
import board
import neopixel
pixel_pin = board.D2
num_pixels = 12
ORDER = neopixel.GRBW
pixels = neopixel.NeoPixel(
pixel_pin, num_pixels, brightness=0.2, auto_write=False, pixel_order=ORDER
)
pixels.fill((0, 0, 255, 0))
pixels.show()