atuline / FastLED-Demos

Here's my updated FastLED demos from January, 2017.
GNU General Public License v3.0
611 stars 174 forks source link

flicker #2

Open antonmeyer opened 8 years ago

antonmeyer commented 8 years ago

if you move the show call into EVERY_N call output get much more smooth. I guess that the high refresh rate of leds causes the flicker.

And as long you do not change the LEDs there is no need for a show call.

results in:

void loop () { EVERY_N_MILLISECONDS(thisdelay) { // FastLED based non-blocking delay to update/display the sequence. ripple(); show_at_max_brightness_for_power(); }

} // loop()

NicoHood commented 8 years ago

You can reduce the refresh rate with fastled itself and you should be able to update the leds in the loop as often as you like (unless you need more fps within other parts of the program). Fastled 3.1 should fix this automatic to keep the update rate low enough. You should probably supply a bit more information about what leds you use and when you run into problems.

antonmeyer commented 8 years ago

Hi Nico, finally you are right. With other example sketches it works better. Where it breakes the logic: a higher refresh rate should look better. I will do some experiments with the framerate. Thanks for that hint. I'm using a WS2812B stripe. And a 16 MHz atmel 328. May be there is a kind of interference.

atuline commented 8 years ago

I was actually doing what antonmeyer suggested a while back by performing a show only when changes occur, but I vaguely recall a conversation with Daniel Garcia where he said to run the show continuously. I'll play around with that again.

Haven't seen any flicker myself though, and I'm using WS2812's and APA102's. I used to get flicker on pin 13, but they patched that issue and I now use pins 11 and 12 on the Nano.

antonmeyer commented 8 years ago

Ok, I will double check. May be I should just add a resistor and/or capacitor.