enter image description hereenter image description hereHi everyone I have an issue with getting these LEDs to cooperate.

I'm using a 470ohm resistor on the data port and a capacitor for the power. I complied and uploaded the "strandtest"(I changed the variables NUM_LED & LED_PIN) and this occurs [10s Video: https://drive.google.com/file/d/1xabkHW1xgFo9kh3YnGwIsaS5tSfFCsrb/view?usp=sharing] This happens to all code in a loop. If I send no signals (aka put an empty pin and run) then the lights that were last on stay lit. If I try to clear the LED nothing happens. If I try to set a specific LED to a specific color/brightness nothing happens.

I'm at my wit's end; help a brother out!

LEDs Used:https://www.amazon.com/gp/product/B00ZHB9M6A/ref=ppx_yo_dt_b_asin_title_o02_s01?ie=UTF8&th=1 AC to DC 5V 5A: https://www.amazon.com/ALITOVE-Converter-5-5x2-1mm-100V-240V-Security/dp/B078RT3ZPS/ref=pd_bxgy_img_2/143-9706163-2199558?_encoding=UTF8&pd_rd_i=B078RT3ZPS&pd_rd_r=4133e781-45a6-4112-a571-c311f45e0720&pd_rd_w=t0bs4&pd_rd_wg=TIEcS&pf_rd_p=f325d01c-4658-4593-be83-3e12ca663f0e&pf_rd_r=PPCEVPJVY8N6XFTY1AD4&psc=1&refRID=PPCEVPJVY8N6XFTY1AD4

#include <FastLED.h>

// How many leds in your strip?
#define NUM_LEDS 150

// For led chips like WS2812, which have a data line, ground, and power, you just
// need to define DATA_PIN.  For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
// Clock pin only needed for SPI based chipsets when not using hardware SPI
#define DATA_PIN 3
#define CLOCK_PIN 13

// Define the array of leds

void setup() { 
    // Uncomment/edit one of the following lines for your leds arrangement.
    // ## Clockless types ##
    //FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);  // GRB ordering is assumed
    // FastLED.addLeds<SM16703, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<TM1829, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<TM1812, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<UCS1904, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<UCS2903, DATA_PIN, RGB>(leds, NUM_LEDS);
     //FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);  // GRB ordering is typical
    // FastLED.addLeds<WS2852, DATA_PIN, RGB>(leds, NUM_LEDS);  // GRB ordering is typical

  FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);  // GRB ordering is typical

    // FastLED.addLeds<GS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<SK6812, DATA_PIN, RGB>(leds, NUM_LEDS);  // GRB ordering is typical
    // FastLED.addLeds<SK6822, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<APA106, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<PL9823, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<SK6822, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<WS2813, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<APA104, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<WS2811_400, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<GE8822, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<LPD1886, DATA_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<LPD1886_8BIT, DATA_PIN, RGB>(leds, NUM_LEDS);
    // ## Clocked (SPI) types ##
    // FastLED.addLeds<LPD6803, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);  // GRB ordering is typical
    // FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);  // GRB ordering is typical
    // FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<WS2803, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
    // FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);  // BGR ordering is typical
    // FastLED.addLeds<DOTSTAR, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);  // BGR ordering is typical
    // FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);  // BGR ordering is typical
    // FastLED.addLeds<SK9822, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);  // BGR ordering is typical

void loop() { 
  // Turn the LED on, then pause
  leds[0] = CRGB::Red;
  // Now turn the LED off, then pause
  leds[0] = CRGB::Black;
  • 2
    Please also describe with words, what is actually happening and how that doesn't fit your expectations. Not everybody wants to first watch your video and the link might go dead in some time, making the question not understandable. And please share your code. If you used an example code, please link to it. Also exactly describe what you have changed how.
    – chrisl
    Nov 26, 2020 at 7:39
  • Of course the last LED state stay, when you send no signals. Thats how these LEDs work. They keep their state, until you send them new data or power cycle them. What do you mean with "If I try to clear the LED nothing happens"? Are you trying while the strip is on an unused pin? If not, how and where in the code exactly are you trying to clear it?
    – chrisl
    Nov 26, 2020 at 7:41
  • 2
    Did you connect the ground of the LEDs to the ground of your Arduino? I can't really see from your video but I suspect you did not. BTW it's much better to describe how everything is connected together instead of showing a video in which you really can't see much except for flashing LEDs. A schematic would be even better.
    – StarCat
    Nov 26, 2020 at 7:53
  • @StarCat I can see a ground connection from the Arduino to the breadboard. If the breadboard's ground is continuous, though, I can't quite tell.
    – Majenko
    Nov 26, 2020 at 11:55
  • @Alex try this library: github.com/FastLED/FastLED instead of the Adafruit Neopixel, the FastLED library is very handy and very powerful, I prefer it over the Neopixel. Just for you to know there are other options.
    – k.Cyborg
    Nov 26, 2020 at 17:18

1 Answer 1


Don't use the Neopixel library. for LEDs that have WS2812B the FastLED is the best option. I also had issues with the LEDs flashing on and off randomly but using this library and then changing the driver to W2812B made it work. Your power supply is plenty strong.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.