Skip to content

Red causes random flashing on diy arduino #1044

Closed

Description

@achampagne1

I created a DIY arduino using the attached schematic:
Capture4
The Dout flag is the data line for the light strip, 5V of the strip is connected to the clean power flag, and ground of the strip is connected to ground. The whole circuit is being powered by usb from my laptop. I am driving 16 WS2812 LED (I know USB can not supply enough current for all at max brightness at once). I am using the code below to pulse the LED:
void pulse(int R,int G, int B){ int brightness = 255; int fadeAmount = -1; for(int j=0;j<500;j++){ for(int i = 0; i < NUM_LEDS; i++ ){ leds[i].setRGB(R,G,B); leds[i].fadeLightBy(brightness); } FastLED.show(); brightness = brightness + fadeAmount; if(brightness == 0 || brightness == 255){ fadeAmount = -fadeAmount ; } delay(10); } }
if I call the function with a tiny bit of red, like pulse(10,110,0);
then the LED gently pulse, but a lot of the LED start flashing with random colors. This behavior does not happen if I call the function using just green pulse(0,110,0); or with just blue pulse(0,0,110); Why would just the red color be causing this? I am using the arduino IDE to program the board.

Activity

  1. SnowMB commented on Jul 10, 2020

    @SnowMB
    Contributor

    Formatted:

    void pulse(int R,int G, int B)
    { 
      int brightness = 255; 
      int fadeAmount = -1; 
      for(int j=0;j<500;j++)
      { 
        for(int i = 0; i < NUM_LEDS; i++ )
        { 
          leds[i].setRGB(R,G,B); 
          leds[i].fadeLightBy(brightness); 
        } 
        FastLED.show(); 
        brightness = brightness + fadeAmount; 
        if(brightness == 0 || brightness == 255)
        { 
          fadeAmount = -fadeAmount ; 
        } 
        delay(10); 
      } 
    }
  2. Turbine1991 commented on Nov 21, 2021

    @Turbine1991

    I'm also getting this issue.

  3. marmilicious commented on Nov 21, 2021

    @marmilicious
    Contributor

    You might want to post your question to the FastLED reddit group where more people will see it. Maybe you can share a video there too? If you run this on a non-DIY (commercially available) UNO or similar do you see the flickering?

    I tried your code (grabbed the formatted version that SnowMB posted) and also made this modified version and didn't see flickers (with my LPD8806 leds). You didn't include a full program so I don't know what your master brightness was set to. With a very low master brightness I do see stepping with your code, but not random flickering.

    It's best to not use delay() and let FastLED.show() run as often as possible to get the dithering. https://github.com/FastLED/FastLED/wiki/FastLED-Temporal-Dithering

  4. added
    area: core
    status: stale
    status: triage
    on Apr 16, 2026
  5. moved this from Triage to Done in FastLED Trackeron Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: corestatus: stalestatus: triage

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions