Skip to content

led flickering (not ESP!) #659

Closed
Closed

Description

@Adrianotiger

Hi,
I had a neopixel project and rewrote it for FastLED. With this library the leds are flickering.
I am using a simple Arduino mini (16MHz/5V) without any interrupts and ground is connected correctly. As said, it works perfectly with Neopixel library. It happens when I have multiple strips and the LED colors are on the minimum.
Here the code:

#include <FastLED.h>

CRGB ledsStrip[14];
CRGB ledsCircle[24];
CRGB ledsWheel[19];

void setup() {
  FastLED.addLeds<NEOPIXEL, 7>(ledsStrip, 14);
  FastLED.addLeds<NEOPIXEL, 8>(ledsCircle, 24);
  FastLED.addLeds<NEOPIXEL, 9>(ledsWheel, 19);
}

void loop() {
  for(int i=0;i<14;i++) ledsStrip[i] = CRGB(2, 0, 6);
  for(int i=0;i<24;i++) ledsCircle[i] = CRGB(0, 1, 1);
  for(int i=0;i<19;i++) ledsWheel[i] = CRGB(1, 1, 0);
  FastLED.show();
  delay(1);
}

Maybe the timings is not like expected or the ws2812b leds are not originals. But it is strange that it works with Neopixels and I see the flickering with the FastLED library.

Edit:
with this code, the flickering is extreme:

#include <FastLED.h>

CRGB ledsStrip[14];
CRGB ledsCircle[24];
CRGB ledsWheel[19];
double s = 0.0;

void setup() {
  FastLED.addLeds<NEOPIXEL, 7>(ledsStrip, 14);
  FastLED.addLeds<NEOPIXEL, 8>(ledsCircle, 24);
  FastLED.addLeds<NEOPIXEL, 9>(ledsWheel, 19);
}

void loop() {
  for(int i=0;i<14;i++) ledsStrip[i] = CRGB(sin(s+i/10.0) * 5 + 5, 0, cos(s+i/10.0)*100 + 100);
  for(int i=0;i<24;i++) ledsCircle[i] = CRGB(0, 1, 1);
  for(int i=0;i<19;i++) ledsWheel[i] = CRGB(1, 1, 0);
  FastLED.show();
  s+=0.01;
  delay(3);
}

Activity

  1. focalintent commented on Oct 1, 2018

    @focalintent
    Contributor

    Try turning off dithering - it’s possible that is what you are seeing at such low brightness levels.

  2. Adrianotiger commented on Oct 1, 2018

    @Adrianotiger
    Author

    Thank you.
    With FastLED.setDither(0) it works.

    I was reading this:
    https://github.com/FastLED/FastLED/wiki/FastLED-Temporal-Dithering
    And if I understand it correctly, it should be activated only if brightness is not 255.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions