I know the FastLED library is generally used with LED strips or even relatively small LED matrices. Has anyone ever tried to use the library on a full LCD display? I would like to port some of the mandela code I’ve seen here onto a 3.5" 320x200 display running a teensy 3.1 controller.
Am I crazy?
You might be crazy, and it also might work – assuming the RAM situation can be managed.
A single normal RGB pixel takes up 3 bytes of RAM.
A 320 x 200 pixel display has 64,000 pixels.
At three bytes per pixel, that’s 192K of RAM.
The Teensy 3.1 has “only”(!) 64K of RAM.
If there’s some way to generate each pixel’s value fresh for each frame (i.e. have each frame of the animation generated completely independently of any previous frames) and some way to send that pixel data directly to the LCD panel, then this seems possible at least!
It’ll require some thinking, which is often the hard part.
RAM first: The library has a few globals that it uses, e.g., the settings for master brightness, etc, as well as the head of the list of LED strip controller objects, and all those things take up some space. Seven bytes seems approximately right; I certainly wouldn’t expect much less.
As for flash if none of the FastLED code is being called at all… well, that’s interesting. I wonder what code is being included by the compiler, and why the compiler thinks it’s needed.
Finally, please do open a github ticket for the 16u2 issue. The 16u2 isn’t on our “supported” MCU list, but maybe it’s a simple fix, and we can probably take a look. When you open the github ticket, please include as much info as you can about how you’re configuring the Arduino IDE to compile for the 16u2, since I think it’s not one of the regularly supported microcontrollers. Thanks – we can continue this part of the conversation over there.