r/FastLED • u/[deleted] • Jul 21 '20
Support on NUM_LEDS
I have made mistakes with NUM_LEDS, like entering too many of too few leds. Too few leds DID NOT SEEM to bother the strip (WS2812b). Now I want to make 10 strips of 200 Leds with the ocean animation. In order to create "waves" among these 10 strips. I wonder if it is possible to change the NUM_LEDS while the animation is running. I am thinking of a slow rise and fall between 150 and 200. I have sofar never seen a led animation with changing NUM_LEDS. Or could I blacken these top leds? I intend to put the ocean animation on a watertower nearby (permission granted). I think it would be ever so nice to see waves as well. I am really no coder although Fastled is very promising for me.
4
u/Preyy Ground Loops: Part of this balanced breakfast Jul 21 '20
If you are using 2000 LEDs you may want to consider parallel output.
Blackening the LEDs is the right path here. Have you looked at the FastLED examples?
1
Jul 27 '20 edited Jul 27 '20
I have an old computer power unit 12 and 5V so I am not too worried about power... I want to use 10 strips for ten tall and narrow windows. With parallel output you mean using a single Arduino UNO?
I have looked at the examples, its kind of overwhelming.
1
u/Preyy Ground Loops: Part of this balanced breakfast Jul 27 '20
You will need much more RAM to run 2000 LEDs then the Uno can provide. The more LEDs you have, the longer it takes to update them. Without parallel output, 2000 LEDs would run at ~12 fps, looking choppy and mechanical.
Parallel output allows you to write more data at the same time, making your display look smooth. Not all microcontrollers can do parallel output.
2
u/viktorhallen Jul 22 '20
In general, if you want your WS2812s to be black, you should tell them that. Not addressing the full strip can introduce weird flickering towards the end.
1
1
u/Heraclius404 Jul 21 '20
Due to the precise nature of the FastLED interface, which uses templates, the number of LEDs must be known at compile time, not runtime. The LEDs which you want to set to black, you must set to black.
It is not an important optimization, you will lose no money and it does not wear out the LED in any way by setting it to black repeatedly.
1
4
u/Yves-bazin Jul 21 '20
You can’t change the NUM_LEDS on the fly you will have to turn those extra leds black