Adafruit_NeoPixel vs. FastLED

Hello everyone,

with all humbleness I wonder why people still recommend to use the Adafruit library.

Compared to FastLED in nearly all situations the NeoPixel library

-uses more RAM,
-the compiled sketch built is larger and
-the delivered frames per second are less

For a detailed comparison have a look here.

FastLED also offers way more useful functions for led animations like

-fast math and memory functions,
-wave functions
-simplex noise functions
-color palettes
-build in gamma and color correction

to name just a few advantages.

Beside that FastLED supports not only Neopixels but basically any led controller on the market.

Could anyone tell me a logical reason, why or in which scenario the Adafruit library is the better choice?

I’m sure I’m just overlooking something here, but I don’t get it yet. So I’m asking!

Cheers and thanks for any hint.

Helmuth

Thanks for the review and recommendation, Helmuth. I am half way through a project using the Adafruit library, so when I get back to it, perhaps I will swap libraries and see what difference I notice (ram, program size, etc).

I suspect the answer to your question is that the ws2812b leds have been nicknamed "neopixels" and the name has stuck. So when a lot of Arduino users go looking for a library, the search term they use is "neopixels" and they find the Adafruit site and so on.

Paul

Basically the NeoPixel library came first, is simple to install and use, and Adafruit supports it; making things simple if you are a beginner and buy from them. Note that even the Adafruits NeoPixel Uberguide recommends FastLED for advanced use. Some of their tutorials use it instead of the NeoPixel library.

Interesting thread!

Maybe some more people could tell about their experiences!

Nearby i'd like to build a stairslight and i'm actually not sure which library i should use.

Want to use these stripes.

Greetz Chris

Basically the NeoPixel library came first

Well, I remember how glad I was to find the FastSPI library in a time where this was the only working solution for driving programmable leds. That was the beginning of FastLED. Neopixels didn´t exist on the market at this time.

is simple to install and use

Here I see no difference.

and Adafruit supports it

Please note that we have a vibrant FastLED (formerly FastSPI) community where every exotic problem is usually solved within hours.

making things simple if you are a beginner

Okay, I see that there are many tutorials out there which make the start easy. FastLED might appear a bit overwelming at the beginning and the documentation expects that you know what you are looking for.

Note that even the Adafruits NeoPixel Uberguide recommends FastLED for advanced use.

I second that. The problem I see is that people who started with the Neopixel lib often have a hard time rewriting their animations for FastLED, because the style/syntax is quite different.

Chris72622: Nearby I'd like to build a stairslight and I'm actually not sure which library I should use.

That's easy.

We are here, taking about programmable (and contrary to the "early days" of microprocessors, reprogrammable) devices.

So there is not problem at all.


You start with one library, and then you build the same program with the other library.

Then you will know.

And the time you spend doing both is not going to be all that significant.

I use the Adafruit library because I've had problems making FastLED work in some circumstances (with non-standard AVR chips - I forget which one gave me trouble), and when I looked at the code to try to fix it, it was #define hell, and I was thoroughly unsuccessful at figuring out why it wasn't working.

For one project I took a chainsaw to the Neopixel library - https://github.com/SpenceKonde/Adafruit_NeoPixel_Static (note - none of the examples have been modified to work, only documentation that's been updated is the readme) - it saves 800-1k of flash (assuming you don't use malloc/free or things that use them (like String) elsewhere in your sketch).

Re-visit

Reasons for bringing this post back up

  1. I am not a developer in any sort of sense so you all know.

  2. To agree that fastLED is to me at least better than Ada's offering.

  3. Many of the current "fastled" libs won't run under CREATE and wondered if anyone else has had the issue and for any work arounds ?

CREATE

?

The official Arduino ONLINE IDE.

Thanks @Ballscrewbob, was unaware of that. Might try it sometime and think about the advantages and disadvantages for me.

Ballscrewbob: Many of the current "fastled" libs won't run under CREATE

What exactly isn't working?

Re: FastLED vs Adafruit_NeoPixel. I recently did a project with WS2812 and ended up deciding to use FastLED instead of the Adafruit library or other options after quite a bit of research. It was a bit difficult to decide what was the best library because I was using ESP8266. I do like FastLED but found the documentation to be very hard to work with. Sometimes I really don't like Doxygen generated documentation and this was some of the worst I've ever encountered. Trying to dig through this source code was way to complicated for me. I ended up stumbling my way to what I needed by using some examples and trial and error but it was way more work than it needed to be and I get the feeling there are some awesome features of that library that I just don't know how to find the documentation for.

Hi Pert

Fastled would not work on Create DEV side so I had a wrod on GIT and needed to make a change to the H file.
Fast ed is my prefered lib for wsw8xx strings too.
There is a good group and forum if you need any help and I got sorted out pretty quickly with what I needed.

Ballscrewbob: would not work on Create DEV side

What is Create DEV side?

Ballscrewbob: I had a wrod on GIT

What does that mean?

Ballscrewbob: needed to make a change to the H file.

What was the change?

Ballscrewbob: There is a good group and forum

Yeah, that's great, though I'm not a fan of Google+, but for me asking for help on a forum is the last resort after I've spent hours researching and trying to figure things out on my own, which I was able to do eventually. It just took longer than it could have. I suppose it's not really fair to compare the two libraries based on documentation because the Adafruit library has so much less to document but it seems to have been well done.

Sozz Pert the "development" side of create.

Typo "WORD"

Comment out a line in fastled.h that causes a stderr on create before the sketch is uploaded.

For searching for and often past what I was looking for google is a great tool. Asking questions is about learning things. Yes I will try on my own but there is always that knowledge that eludes you that somebody else has and often that other person is willing to impart to others as you yourself do so well many times a day. I guess you help out on the dev side of the IDE which means your knowledge is especially valuable to users.

Just for the record: Here is the FastLED wiki explaining everything important for FastLED beginners.

Please note that it covers only a part of the functionality. The library examples show some more advanced stuff.

I agree the the Doxygen documentation is only helpful when you know what you are looking for. At the other hand - it´s easier to get an impression what the lib can do for you compared to reading all the source code files.

@pert: ESP8266 notes

In case somebody else look at this post: fastled does not yet support RGBW, this is a good reason (only ? ) not to use it :-)

https://github.com/FastLED/FastLED/issues/482

FastLED is a bit less intuitive to use I think and takes more effort to learn. That being said the outcome of getting past the learning curve is very rewarding.

The Neopixel Library is very limiting but more intuitive I think and thus easier for beginners to use and the reason many people use this one instead.

Personally the quality of the FastLED library is outstanding, I especially love the CHSV with variables being hue (color), saturation, brightness. One thing I hated about the Neopixel library was the brightness control. It was absolutely sh*t and hard to get right and had to control it by dividing the color of either R, G or B by some common factor where as in FastLED there is literally a numeric value by itself for controlling this feature.

So to answer the question, the only time Neopixel should be chosen over FastLED is when you want to do something, but are too inpatient or lazy to learn how FastLED works. Even then, FastLED imo is still relatively easy.

Well, thank you for your opinion. We've been practising our patience over the last 2 years, so i'd say that's covered.

;)

Hi, I just changed to FastLED because i have some issues with the Neopixel Library. As i am programming some candle lights simulation with WS2812B with more than one LED and it includes sometimes fast flickering of the "candles", the other LEDs on the same string, mostly the darker ones or the disabled ones begin to flicker in any color. The problem i think is the timing.

i just changed from Neopixel (i began with) to FastLED and the unwanted flickering is gone. Currently i tested it on ESP32 but i have the problem also with Arduino (mostly NANO), UNO and MEGA. I hope the FastLED works also alot better with the Arduino (i test this later).

But, with FastLED i have slower Looping, because the .show disables everything until all Data were sent out. Currently that is no problem as i do nothing others than just simulating candles (christmas lights) but maybe i will try later on to put that code to the other core of the ESP32 (don't know if this works).

Versions (2019 - December): Neopixel: 1.3.4 FastLED: 3.3.2