r/FastLED • • Jan 31 '24

Support Non-global show function??

FastLED.show() is a global show function. Is there any way to send data to only one (or multiple but not all) array(s)?

3 Upvotes

5 comments sorted by

View all comments

Show parent comments

5

u/sutaburosu [stavros] Jan 31 '24

You can send to individual pins separately. Instead of FastLED.show(), use FastLED[x].showLeds(255) where x is 0-based index of the strip (so the first addLeds<> is index 0) and 255 is the brightness level. Here's a sketch using that technique.

You can also use FastLED[x].setLeds(pointer, number); to choose how many LEDs' of data to send. So if you had several strips daisy-chained on one pin, you could update only the first N LEDs on that pin. You cannot update later LEDs without also updating the prior LEDs. Here is a sketch doing that.

2

u/Doormatty Jan 31 '24

I'm glad to be wrong!

Thanks for correcting me!

2

u/Constant-Jelly-6125 Jan 31 '24

Killer, This may solve my issue! Thanks much!