I’m using the FastLED library to run some WS2811 pixels. My issue is the first pixel connected to the power source is always on and seems to cycle in colour. I’ve got a simple code for debugging but the same issue happens. First pixel to the power supply is always on. I have no idea what is going on. I’m using an Arduino Uno and FastLED 3.001.000.
LEDS.showColor(CRGB::Black);
delay(1000);
LEDS.showColor(CRGB(255, 0, 0)); //turn all pixels on red
delay(1000);
LEDS.showColor(CRGB(0, 255, 0)); //turn all pixels on green
delay(1000);
LEDS.showColor(CRGB(0, 0, 255)); //turn all pixels on blue
delay(1000);
LEDS.showColor(CRGB(0, 0, 0)); //turn all pixels off
delay(1000);
for(int j=0; j<50; j++){
leds[j] = CRGB(255,255,255);
FastLED.show();
leds[j] = CRGB(0,0,0);
delay(20);
}
}
I would say that first pixel is probably damaged. Do you have a resistor between the Arduino data pin and the input of that first LED !?
If you connect/disconnect your LEDS or strips while power is applied without that resistor, it could happen easily !
… or just try (DON’T !!!) to unplug ground while powered up - and BAMMM!
Cut off the first LED (or feed the data cable in between the first and second LED.
Hey guys, Thanks for your reply… I cut the first LED off and put a 300R resistor between the new first LED and the arduino… Same problem as before though. Do you think the arduino just keeps damaging the LED’s??
@Michael_Hannan It is not easy to give a definitive answer here but I do not believe the Arduino could damage the LEDS.
Can you describe your problem clearly, what is happening with all the other LEDs, do they work ? Can you post pictures of your setup ? Have you tried changing to a different Arduino pin ?
Take your data output, a longer jumper wire and >carefully< poke it on the middle pin at the first LED, second, and so on.
You will see whether there is a LED defect.
Also control with a magnifier your solder pads. I had a case where a tiny little copper flake from cutting the strip made intermittend short cuts.
Thanks everyone for their help… I eventually, after 2 days of pure frustration, figured it out… So it turns out that connecting the Arduino ground pin to the LED ground wire is SUPER important when it comes to LED’s… I thought this wouldn’t even be a player but that was the issue. A soon as I connected the Arduino ground to the LED ground the LED in question turned off and vice versa for when i disconnected it. The LED’s are now working as advertised!! Whoohoo… Next step for me is turning the Arduino into and E1.31 controller.