FastLED support is only for APA102, correct?


#1

I have a bunch of code I wrote for FastLED::NeoMatrix (which offers the Adafruit::GFX API) which I’m going to port to SmartMatrix.
I really don’t want to change the code to use the SmartMatrix API since I just want it to keep working if I swap hardware backends on it (afterall that was the point of using Adafruit::GFX).
Adafruit::GFX of course does support LED Panels, I even wrote demo code for it: https://github.com/adafruit/RGB-matrix-Panel/tree/master/examples/PanelGFXDemo_16x32
but this is not compatible with SmartMatrix.

Am I correct that basically my best bet is to write a SmartMatrix::NeoMatrix glue library that will take GFX code and send it to SmartMatrix? At the same time, I’ll probably offer basic FastLED compat shims too.

Does that sound like the right way to do it, or was it done already, or am I thinking about doing it wrong?

Thanks, Marc


#2

Hi Marc, I’d start with the FastLED_Functions example, which shows how to get a pointer to the buffer structure inside SmartMatrix Library, fill it efficiently, and swap buffers to refresh the contents of the buffer on the panels:

For a simpler but less efficient way of loading the buffers, see the code in the AnimatedGIFs example callback functions:

  • Louis

#3

Thanks, I will have a look when I work on this over my vacation.