Created Library Comparisons (markdown)

Michael Miller
2019-04-24 10:06:22 -07:00
parent 4e452617d4
commit 702ea9d59f

19
Library-Comparisons.md Normal file

@@ -0,0 +1,19 @@
There are multiple competing libraries, FastLED being the biggest and Adafruit NeoPixel being the most common for beginners.
On ESP8226, your primary choices are:
* NeoPixelBus
* Smaller than FastLED, more features and pixel support than esp8266_ws2812_i2s
* On Esp8266 you can choose i2s DMA or UART, both avoiding interrupts (NMIs). FastLED uses interrupts which can be problematic if you use other code that relies on interrupts, or wifi (although FastLED allows other fast interrupts to fire in between pixel updates)
* Supports RGBW pixels (not supported by the other 2 libraries) https://github.com/JoDaNl/esp8266_ws2812_i2s/
* Uses I2S interface to drive Neopixels via DMA providing an asynchronous update.
* Can use UART both in a synchronous and asynchronous model, but asynchronous limits the use of other UART libraries.
* Low level API with other features exposed by external classes.
* Pins available for use varies by platform due to hardware limitations.
* FastLED
* Very rich API, although at a cost of large code and memory size
* Interrupt driven on ESP8266, so it's sensitive to timing (not an issue on ESP32 which uses RMT)
* Adafruit::NeoPixel
* Basic bit bang and interrupt driven library which does not support any other interrupt driven code to work. Not recommended.
On ESP32, if you need more than one channel/bus, FastLED is your only choice. It comes at a cost of bigger code size but the 8 parallel channels for better refresh rate on longer strings (useful past 256 pixels) can't be dismissed. Further,
if you have 4096 pixels or more, you can use the 16 way output driver from Yves as described on this [on this page](http://marc.merlins.org/perso/arduino/post_2018-07-30_Building-a-64x64-Neopixel-Neomatrix-_4096-pixels_-running-NeoMatrix-FastLED-IR.html#esp32driver)