First NeoPixel in string turns red instead of off

Basically, no matter what code I send to the string of NeoPixels, the first one turns red when I try to turn it off from a Proton.

I’ve checked the Photon by testing another, as well as tested a different string of NeoPixels.

@Starlight, some code and details on how you connect the Photon to the neopixels, number of LEDs, etc, would be nice.

It’s a strip of 25 LEDs. Power is connected to 3v3, Data is connected to D0.

Here’s a sample code:

#include <neopixel.h>

#define PIXEL_COUNT 25
#define PIXEL_PIN D0
#define PIXEL_TYPE WS2811

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

void setup() {

void loop() {
    for(i=0; i < PIXEL_COUNT; i++) {
    strip.setPixelColor(i, 0, 0, 0);; }

@Starlight, the 3v3 pin can only supply about 100ma. You should power the string using Vin (aka USB voltage of about 5v). :wink:

@peekay123, I’ve now changed that.

@Starlight, and… ?

@peekay123, well, after I realized the code was saying to turn red and flashed something different, still no luck.

@Starlight, can you describe your wiring? Also, try using D2 instead.

@peekay123, in a word: basic. Power is now running through VIN, Ground to GND, and Data to D2. That’s it.

I have a 100-count string with the same problem. Try a 1k resistor between the data pin and the first LED in the string. That can help reduce flicker and may fix the red pixel. Unfortunately, my string is on the front porch and everything is soldered in place without the resistor, so it’s hard to test. I consider it a “security light” when the other 99 LEDs are off and the first one stays red.


Also, try adding a level shifter on the data output. NeoPixels really should be driven with 5V signal, but can work with 3.3V… when you find strange cases that they don’t work at 3.3V, it’s time to level shift. Check the NeoPixel repo for chips that are approved for level shifting. Some are too slow to be useful.

1 Like