I'm currently working off an Arduino Uno. I was having issues with running out of RAM, and I managed to fix them. Then the person who this project is for let me know that there is another strip of 150 LEDs which are all one color.
This wouldn't be an issue, but the only way to set leds colors in FastLED that I know of is to give an array of colors where each index represents an LED.
In this scenario that's 450bytes of data, which is roughly 25% of an Arduino Unos ram, entirely dedicated to 3 bytes worth of data: one single color.
Now, besides this being an abhorrent waste of resources, it's also something I simply can not afford.
Does anybody know how I can set 150 LEDS to the same color without making an array?
What I've tried so far:
I've tried going through the source code of FastLED, and have found that CFastLED::addLeds
creates a CLEDController
which later has CLEDController::show()
called, which then calls 'showPixels()' which is a virtual function that is deabstracted by each different type of strip protocol class, and always requires an LED[] array. As far as I can tell, I would have to dive into each different protocol class before I could do this, at which point I might as well delete FastLED and write my own version from scratch.
In my scenario, the bottom of the chain seems to be this: https://github.com/FastLED/FastLED/blob/03d12093a92ee2b64fabb03412aa0c3e4f6384dd/platforms/arm/k20/octows2811_controller.h#L40
It seems there's really no decent way to set an entire strip of LEDs to the same color in FastLED.