r/FastLED • u/ratkins • Sep 04 '24
Quasi-related What other libraries are built on FastLED?
Aside from wled (I think), what other high(er)-level libraries are built on FastLED?
I've been using Pixelblaze recently and I'm not a fan of how finicky the wifi is, how limited direct access to IO is and how the environment runs on the device itself and source control is impossible.
On the other hand I do like its LED mapping model. But it strikes me that higher level primitives like this and other things (like "draw me a line", "draw a circle/disc/sphere") ought to be easily implemented on top of FastLED while retaining its lower-level access.
Has anyone already done this?
5
u/dr-steve Sep 06 '24
I've been using LEDMatrix for a bit to create larger LED grids from 16x16 tiles, running on ESP32 processors. I've extended it to use world coordinates (floating point spaces), extended object functionality, and anti-aliasing. In other words, taking advantage of the FPU on the ESP32 (as well as its ability to drive up to 16 independent strands for improved frame display) to make the object animation work in *my* coordinate system instead of fixed device pixels.
I'll probably release it in a couple of months after I get past an upcoming art installation and get to clean things up a bit. A lot of tech debt has accumulated.
6
u/johnny5canuck Sep 04 '24
WLED uses the NeoPixelBus library to drive LEDs (including RGBW), but also includes FastLED for the math functions. As a result, I was able to incorporate some of my FastLED animations into my own fork of WLED and later added 2D as well as sound (both volume and frequency) reactivity to it. Was getting over my head and other developers have since continued on where I left off and added an interpreter and more. Some of that work has been incorporated upstream, while the rest is now called MoonModules.
2
u/_ettb_ Sep 04 '24
I made FastLEDHub a while ago. It doesn't have those higher level functions you asked for but it allows you to write your own animations with the ability to use source control. I've never tried Pixelblaze so I can't really compare it but maybe FastLEDHub could be interesting for you.
2
u/techaaron Sep 04 '24
If you need to do 3d mapping on ESP chips you might want to use the platform I wrote specifically for the purpose.
https://github.com/aaronaverill/esp-spatial-led
It's open source and unlike WLED is laser targeted to the use case of smaller 3d art projects with a very small code base that does only what is needed. The code is all easy to read and well documented and developer friendly.
You're welcome to fork it and add whatever functions you want. Here's a video of the live preview for 3d mapping.
https://www.youtube.com/watch?v=l2D9F8ApdD4
One of the reasons newer platforms have gone away from FastLED is that the way the authors chose to structure the code doesn't allow for dynamically changing things like RGB order, chipset or pin - you have to change code and recompile. When ESP came out with wifi and the ability to configure the software from a web server this changed the game. It meant you could have select elements on a web page to pick chipset and color order and pin, rather than needing to tweak and rebuild code. But that also meant the software couldn't use FastLED anymore.
If you want a platform that does more sophisticated things like DMX, multiple fixtures, etc - more of a "stage lighting" kind of use case, check out StartLight which is essentially doing a rewrite of WLED with modern code and none of the baggage a decade old open source software project brings. It's very early days, and there isn't good documentation but they are making strides. They have recently incorporated a live coding feature much like pixelblaze where you can code animations into a web browser and they are instantly reflected in the LED that are playing back.
https://github.com/MoonModules/StarLight
The real sweet spot for FastLED was the AVR chips and 8-bit platforms. Tech has move on and now we have new needs. Better software platforms exist.
2
u/YetAnotherRobert Sep 05 '24
Arduino has a bunch of libraries that all offer a similar (widely cloned) APIs for things like line drawing, drawing circles, etc. like you're asking for. I doubt it actually sits atop FastLED.
NightdriverLED isn't really a library, but it uses FastLED for the USE_281X paths in the code (and not for HUB75, obviously).
That may not a permanent condition. NeoPixelbus is an obvious growth direction to study to cure several years-long open issues with FastLED.
2
u/splat2385 Albert Barber Sep 07 '24
My own library: Pixel Spork does a bit of what you're talking about. It's basically a collection of class-based effects which I've configured to map easily into 2D using systems in the library. It uses FastLED as a base.
It doesn't have any specific built in controls or wifi, but you write code for it as you would any other Arduino library, so there's no reason you couldn't add those using your own code/other libraries.
1
u/Jem_Spencer Sep 04 '24
WLED doesn't use FastLED but the original WLED developers used to be active in the FastLED community.
1
u/polymorphiced Sep 04 '24
I think xlights has a copy of FastLED in it for Single Strand effects.
1
u/ewowi Sep 04 '24 edited Sep 04 '24
Starlight is using FastLED and as a workaround precompiles multiple templates of FastLED.init for different pins so you can reallocate pins without recompiling (don’t remember the size per template but it was ‘acceptable’). Alternatively for FastLED.init and .show also https://github.com/hpwit/I2SClocklessLedDriver can be used (by the same author as Live Coding) . But having the option to use FastLED with dynamic changing Init parameters would be a nice addition