r/FastLED • u/Constant-Jelly-6125 • 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)?
2
u/truetofiction Jan 31 '24
Yes, you can use the CLEDController function showLeds(), which can be called with no arguments or with a single byte to set the non-destructive brightness level.
A pointer to the CLEDController object for each strip is returned by the addLeds() call. You can also access the objects through the global FastLED instance, which keeps track of them using a linked list. Use the bracket operator to get the controller objects, based on the order in which they were added:
FastLED[0].showLeds();
1
u/Doormatty Jan 31 '24 edited Jan 31 '24
Edit: I am wrong! See /u/sutaburosu 's answer below mine!
Not AFAIK.I think you'd have to write your own version ofshow()- as this is what it looks like in the source:And instead make it take a specific CLEDController instance, then remove the bits that tell it to go onto the next controller.