Transform any microcontroller into an LED powerhouse.
Drive 30,000+ LEDs on high-end devices • Sub-$1 compatibility on tiny chips • Background rendering for responsive apps • Nearly every LED chipset supported • #2 most popular Arduino library
#include <FastLED.h>
#define NUM_LEDS 60
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812, 6>(leds, NUM_LEDS);
}
void loop() {
leds[0] = CRGB::Red; FastLED.show(); delay(500);
leds[0] = CRGB::Blue; FastLED.show(); delay(500);
}✅ Works on Arduino, ESP32, Teensy, Raspberry Pi, and 50+ other platforms
| Massive Scale | Tiny Footprint | Background Rendering | Universal |
|---|---|---|---|
| Drive 30,000 LEDs on Teensy 4.1 | Runs on $0.50 ATtiny chips | ESP32/Teensy render while you code | Works on 50+ platforms |
| 50 parallel strips on Teensy | <2KB on Arduino Uno | Never miss user input | Nearly every LED chipset |
🎯 Performance: Zero-cost global brightness • High-performance 8-bit math, memory efficient on platforms that need it. 🔧 Developer Experience: Quick platform switching • Extensive examples • Active community support
FastLED's codebase is organized into several major areas. Each directory contains a README with detailed documentation:
| Path | Description |
|---|---|
| src/README.md | Overview of the FastLED source tree including public headers, core foundation, effects, platforms, sensors, and third-party integrations |
| src/fl/README.md | FastLED core library (fl::) providing cross-platform STL-like containers, graphics primitives, math, async, JSON, and I/O utilities |
| src/fx/README.md | FX library with 1D/2D effects, video playback, composition utilities, and links to effect subdirectories |
| src/platforms/readme.md | Platform directory overview with backend selection guide, controller types, board-specific documentation, and links to all platform subdirectories |
- 🆕 Latest Feature
- ⭐ Community Growth
- 🆕 Latest Features
- 🌍 Platform Support
- 📦 Installation
- 📚 Documentation & Support
- 🎮 Advanced Features
- 🤝 Contributing
📊 Detailed Build Status
*Notes: * Giga-R1 support added in 3.9.14 • ** ATtiny4313 has limited memory (WS2812 Blink + APA102 examples only)
*Note: NRF52 XiaoBLE board has mbed engine but doesn't compile against Arduino.h for unknown reasons.
*Beta support added in 3.10.2
*Note: STM103TB has limited PlatformIO support
*MGM240 (EFR32MG24) support for Arduino Nano Matter, SparkFun Thing Plus Matter, and Seeed Xiao MG24 Sense boards
*Notes: * ESP32-C2 support added in 3.9.10 • Espressif compatibility evaluation
New 16-bit RGBW LED chipset support for ARM M0/M0+ platforms (SAMD21/SAMD51). The UCS7604 is a high-resolution 4-channel LED driver with configurable bit depth (8/12/14/16-bit) and dual data rates (800kHz/1.6MHz).
FastLED.addLeds<UCS7604, DATA_PIN, GRB>(leds, NUM_LEDS); // 16-bit mode, 800kHzSee examples/FestivalStick/FestivalStick.ino
Fastled.3.10.2-1.mp4
Advanced animation framework for complex LED visualizations and effects.
Multi-layer compositing & time-based animation control for tech-artists.
fx_wave_demo_small.mp4
| 3.9.13 | 3.9.10 | 3.9.8 | 3.9.2 |
|---|---|---|---|
| HD107 Turbo 40MHz LED support |
ESP32 SPI Super stable WS2812 driver |
Massive Teensy 50 parallel pins on 4.1 |
WS2812 Overclock Up to 70% speed boost |
| 3.7.7 | More Features |
|---|---|
| RGBW Support White channel LED strips |
📋 Full Changelog 📺 Demo Videos |
📺 Live Demos • 📋 Full Changelog
📖 Detailed Feature Information (Click to expand)
See examples/FestivalStick/FestivalStick.ino
Fastled.3.10.2-1.mp4
Video:
fx_wave_demo_small.mp4
Lots of improvements in this release, read the full change list here
- This demo -> FxWave2d
- FireCylinder
- Wraps around so that (0,y) ~= (width-1,y)
- TimeAlpha
- Precision control of animations with time-based alpha transition.
*Note some users find that newer versions of the ESP32 Arduino core (3.10) don't work very well, but older versions do, see issue 1903
- Teensy 4.1: 50 parallel pins
- Teensy 4.0: 42 parallel pins
Update: max overclock has been reported at +70%: https://www.reddit.com/r/FastLED/comments/1gkcb6m/fastled_FASTLED_OVERCLOCK_17/
| Arduino Family | ESP32 Series | Teensy | ARM | Specialty |
|---|---|---|---|---|
| Uno, Nano, Mega Due, Giga R1, R4 |
ESP32, S2, S3, C3 C6, H2, P4 |
3.0, 3.1, 4.0, 4.1 LC + OctoWS2811 |
STM32, NRF52 Apollo3, Silicon Labs |
Raspberry Pi WASM, x86 |
FastLED supports 50+ platforms! From sub-$1 ATtiny chips to high-end Teensy 4.1 with 50 parallel outputs.
| Arduino IDE | PlatformIO | Package Managers |
|---|---|---|
| Library Manager → Search "FastLED" → Install | lib_deps = fastled/FastLED |
pio pkg install --library "fastled/FastLED" |
| Or install latest release .zip | Add to platformio.ini |
Command line installation |
- 🎯 Arduino + PlatformIO Starter - Best of both worlds, works with both IDEs
- 🚀 FastLED Examples - 100+ ready-to-run demos
- 🌐 Web Compiler - Test in your browser
Arduino IDE Setup Instructions (Click to expand)
After installing the Arduino IDE, add FastLED through the Library Manager:
| 📖 Documentation | 💬 Community | 🐛 Issues | 📺 Examples |
|---|---|---|---|
| API Reference | Reddit r/FastLED | GitHub Issues | Live Demos |
| Doxygen Docs | 1000s of users & solutions | Bug reports & feature requests | GitHub Examples |
Need Help? Visit r/FastLED - thousands of knowledgeable users and extensive solution history!
| Platform | Max Parallel Outputs | Performance Notes |
|---|---|---|
| Teensy 4.1 | 50 parallel strips | Current record holder - Example |
| Teensy 4.0 | 42 parallel strips | High-performance ARM Cortex-M7 |
| ESP32DEV | 24 via I2S + 8 via RMT | I2S Example |
| ESP32-S3 | 16 via LCD/I2S + 4 via RMT | LCD/I80 Example (NEW!), I2S Example |
| ESP32-P4 | 16 via LCD (RGB or I80) + RMT | See LCD docs - Supports both RGB and I80 modes |
Note: The new LCD driver is recommended over I2S for better Serial debugging support and memory efficiency. ESP32-P4 supports both RGB and I80 LCD modes. Some ESP32 Arduino core versions (3.10+) have compatibility issues with I2S. Older versions work better - see issue #1903
Applies to: Teensy/ESP32/etc. driving WS2812/WS2813/SK6812 (1-wire) and APA102/clocked chips
📐 Critical Wiring Rules - Eliminate flickering and corruption (Click to expand)
- Tie every ground together: controller GND, each strip GND, PSU GNDs, shield/braid
- Use low-impedance connections (soldered/crimped, not tape-only)
- Keep ground paths short
- Verify: <20mV DC drop between controller and strip GNDs under load
Why: Data line voltage is measured against controller ground. Weak ground = corrupt bits.
- Run each data line twisted with its own ground wire end-to-end
- Use Cat5/6: one pair per output (data on one wire, other wire as return)
- Bond shield to GND at controller side if using shielded cable
Why: Minimizes EMI pickup/emissions and preserves signal integrity over distance.
- 3.3V microcontrollers need level shifting for 5V LED strips
- Use 74HCT245 (8ch), 74HCT541 (8ch), or 74HCT125/126 (4ch) buffers
- Place 33–220Ω series resistors at buffer output (before twisted pair)
- Keep buffers close to controller
Why: Restores full-swing logic and reduces ringing/reflections.
Grounds → ground bus → Teensy GND
Level shifters: 2× 74HCT245 (16 channels), powered at 5V
Per channel: Buffer → 33–100Ω → twisted pair → strip DIN/GND
At strip start: 1000µF cap across +5V/GND
Power injection as needed; keep data/power runs separate
- Signal issues? Try underclocking:
FASTLED_OVERCLOCK=0.8inplatformio.inibuild flags - Long runs failing? Insert dummy LED near controller (set to black, offset array index)
- Intermittent glitches? Ensure all PSUs share the same AC circuit
- ✅ Do: Star/bus ground, twisted pairs, HCT buffers, source resistors, big cap at strip
- ❌ Don't: Float grounds, share one ground for many runs, use unbuffered 3.3V for long 5V lines
Following these practices eliminates 90% of "random sparkle/corruption" issues.
Custom shift register boards can achieve extreme parallel output:
- ESP32DEV: 120-output virtual driver
- ESP32-S3: 120-output S3 driver
⚡ ObjectFLED Driver - DEFAULT driver for Teensy 4.x with advanced parallel output
The ObjectFLED driver is an advanced parallel output driver specifically optimized for Teensy 4.0 and 4.1 boards when using WS2812 LEDs. It provides massive parallel output capacity and is enabled by default on Teensy 4.x - no configuration needed!
- Teensy 4.1: Up to 50 parallel strips
- Teensy 4.0: Up to 42 parallel strips
- Performance: ~7x more strips than OctoWS2811
#include <FastLED.h>
CRGB leds[NUM_LEDS];
void setup() {
// ObjectFLED is used automatically on Teensy 4.x
FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);
}If you encounter compatibility issues or wish to use the standard clockless driver instead of ObjectFLED, you can disable it by defining FASTLED_NOT_USES_OBJECTFLED before including the FastLED header:
#define FASTLED_NOT_USES_OBJECTFLED
#include <FastLED.h>While ObjectFLED is the default for Teensy 4.0/4.1, you can explicitly enable it (though not strictly necessary) using:
#define FASTLED_USES_OBJECTFLED
#include <FastLED.h>🎯 WS2812Serial Driver - High-performance serial-based LED control
The WS2812Serial driver leverages serial ports for LED data transmission on Teensy boards, providing non-blocking operation and precise timing.
To use this driver, you must define USE_WS2812SERIAL before including the FastLED header.
#define USE_WS2812SERIAL
#include <FastLED.h>Then, use WS2812SERIAL as the chipset type in your addLeds call. The data pin is not used for this driver.
FastLED.addLeds<WS2812SERIAL, /* DATA_PIN */, GRB>(leds, NUM_LEDS);| Port | Teensy LC | Teensy 3.2 | Teensy 3.5 | Teensy 3.6 | Teensy 4.0 | Teensy 4.1 |
|---|---|---|---|---|---|---|
| Serial1 | 1, 4, 5, 24 | 1, 5 | 1, 5, 26 | 1, 5, 26 | 1 | 1, 53 |
| Serial2 | 10, 31 | 10 | 10 | 8 | 8 | |
| Serial3 | 8 | 8 | 8 | 14 | 14 | |
| Serial4 | 32 | 32 | 17 | 17 | ||
| Serial5 | 33 | 33 | 20, 39 | 20, 47 | ||
| Serial6 | 48 | 24 | 24 | |||
| Serial7 | 29 | 29 | ||||
| Serial8 | 35 |
🚀 ESP32 LCD Driver - NEW! Memory-efficient parallel output using LCD peripheral (RECOMMENDED)
The LCD driver is a high-performance parallel output driver for ESP32 boards with LCD peripheral support. It uses hardware LCD peripherals to drive up to 16 parallel WS28xx LED strips with automatic chipset timing optimization.
Two Driver Variants:
- I80 Mode: Uses LCD_CAM/I80 peripheral with 3-word-per-bit encoding (6 bytes per bit)
- RGB Mode: Uses RGB LCD controller with 4-pixel-per-bit encoding (8 bytes per bit)
Key Advantages over I2S:
- ✅ More WS282x Chipsets: Better support for WS2811, WS2816, WS2813, etc.
- ✅ Better timing accuracy: Automatic PCLK optimization per chipset
- ✅ Serial output works: Unlike I2S, you can use Serial.print() for debugging
- ✅ Platform-agnostic: Automatically detects and uses available LCD peripheral
- ESP32-S3: LCD_CAM peripheral with I80 interface (3-word encoding)
- ESP32-P4: Both RGB LCD controller (4-pixel encoding) AND I80 interface (3-word encoding)
- Future ESP32 variants: Any chip with RGB or I80 LCD peripheral support
To use the LCD driver instead of I2S, define FASTLED_ESP32_LCD_DRIVER before including FastLED:
#define FASTLED_ESP32_LCD_DRIVER
#include <FastLED.h>
CRGB leds1[NUM_LEDS];
CRGB leds2[NUM_LEDS];
void setup() {
// Standard FastLED API - LCD driver auto-selected
FastLED.addLeds<WS2812, 2>(leds1, NUM_LEDS); // WS2812 on pin 2
FastLED.addLeds<WS2811, 4>(leds2, NUM_LEDS); // WS2811 on pin 4 (slower timing)
}
void loop() {
// Your LED code here
FastLED.show();
}Without the define, FastLED defaults to the I2S driver (legacy behavior).
- Up to 16 parallel strips (all must use the same chipset)
- Memory usage:
- I80 (S3): 144 KB per 1000 LEDs (6 bytes per bit)
- RGB (P4): 192 KB per 1000 LEDs (8 bytes per bit)
- Recommended for new projects on ESP32-S3/P4
- Esp32S3I80 Example - Demonstrates LCD/I80 driver usage
Note: All parallel strips must use the same chipset timing. For per-strip timing control, use the RMT driver.
🔧 ESP32-S3 I2S Driver - Legacy parallel output using I2S peripheral
The ESP32-S3 I2S driver leverages the I2S peripheral for high-performance parallel WS2812 output on ESP32-S3 boards. This driver is a dedicated clockless implementation.
Note: The LCD driver (above) is now recommended for new projects on ESP32-S3 due to better memory efficiency and Serial debugging support.
To use this driver, you must define FASTLED_USES_ESP32S3_I2S before including the FastLED header.
#define FASTLED_USES_ESP32S3_I2S
#include <FastLED.h>Then, use WS2812 as the chipset type in your addLeds call. The data pin will be configured by the I2S driver.
FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);Note: This driver requires a compatible Arduino-ESP32 core/IDF.
📡 Generic ESP32 I2S Driver - Universal I2S support for ESP32
The generic ESP32 I2S driver provides parallel WS2812 output for various ESP32 boards (e.g., ESP32-DevKitC). It uses the I2S peripheral for efficient data transmission.
To use this driver, you must define FASTLED_ESP32_I2S before including the FastLED header.
#define FASTLED_ESP32_I2S
#include <FastLED.h>Then, use WS2812 as the chipset type in your addLeds call:
FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);For improved resilience under interrupt load (e.g., Wi-Fi activity), you can increase the number of I2S DMA buffers:
#define FASTLED_ESP32_I2S_NUM_DMA_BUFFERS 4⚠️ ESP32 RMT Driver Configuration - Critical performance and compatibility information
Important: The RMT4 and RMT5 drivers use completely different APIs. FastLED's custom RMT4 driver is specifically optimized for LED control and significantly outperforms Espressif's generic RMT5 wrapper in terms of:
- Performance: Lower interrupt overhead and better timing precision
- Wi-Fi resistance: Dual-buffer design prevents flickering under Wi-Fi load
- Efficiency: Direct hardware control vs. abstraction layer overhead
- Strip capacity: RMT4 uses worker pools to support more LED strips; RMT5 lacks worker pools and is limited by hardware channels (particularly restrictive on ESP32-C3 with only 2 TX channels)
FastLED includes two RMT driver implementations:
- RMT4 driver: FastLED's custom, highly-optimized driver with direct RMT peripheral control
- RMT5 driver: Wrapper around Espressif's
led_stripcomponent (ESP-IDF 5.0+)
By default, FastLED automatically selects:
- ESP-IDF 5.0+: Uses RMT5 driver (for compatibility)
- ESP-IDF 4.x and earlier: Uses RMT4 driver
To force the use of FastLED's optimized RMT4 driver, you have two options:
Option 1: Arduino IDE - Downgrade ESP32 Core
- Use any ESP32 Arduino Core version below 3.0.
- These versions use ESP-IDF 4.x and below which defaults to RMT4
Option 2: PlatformIO - Set Build Flag
For ESP-IDF 5.0+ environments, set FASTLED_RMT5=0 as a build flag:
[env:esp32]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps = fastled/FastLED
build_flags =
-D FASTLED_RMT5=0📚 PlatformIO Users: For a complete quick start guide with FastLED and PlatformIO, check out our official starter template: github.com/fastled/platformio-starter
Note: Using RMT4 is strongly recommended if you experience flickering with Wi-Fi enabled or need maximum LED performance. RMT4 uses ESP-IDF's legacy RMT APIs which are still maintained for backward compatibility in ESP-IDF 5.x, though marked as deprecated.
🔧 ezWS2812 GPIO Driver - Optimized bit-banging with cycle-accurate timing
The EZWS2812_GPIO driver uses optimized GPIO bit-banging with cycle-accurate timing calibrated for 39MHz and 78MHz CPU frequencies. This driver is always available and requires no hardware peripherals.
- ~400Hz refresh rate
- No hardware peripheral consumption
- Optimized assembly-level timing
#include <FastLED.h>
CRGB leds[NUM_LEDS];
void setup() {
// GPIO-based controller on pin 7
FastLED.addLeds<EZWS2812_GPIO, 7, GRB>(leds, NUM_LEDS);
}⚡ ezWS2812 SPI Driver - Hardware-accelerated maximum performance
The EZWS2812_SPI driver provides hardware SPI acceleration for maximum performance (~1000Hz refresh rate). This driver consumes a hardware SPI peripheral and must be explicitly enabled.
Following the same pattern as ObjectFLED for Teensy, the SPI controller must be explicitly enabled to prevent accidentally consuming the SPI peripheral that may be needed for other components (SD cards, displays, sensors).
Required define before including FastLED:
#define FASTLED_USES_EZWS2812_SPI // MUST be before #include
#include <FastLED.h>
CRGB leds[NUM_LEDS];
void setup() {
// SPI-based controller (consumes hardware SPI)
FastLED.addLeds<EZWS2812_SPI, GRB>(leds, NUM_LEDS);
}- ~1000Hz refresh rate (2.5x faster than GPIO)
- Hardware-accelerated
- Consumes one SPI peripheral
ℹ️ Important Notes - Compatibility and limitations
- Arduino Nano Matter
- SparkFun Thing Plus Matter
- Seeed Xiao MG24 Sense
The EZWS2812_GPIO and EZWS2812_SPI controllers are optimized specifically for WS2812 LEDs only. For other LED chipsets (SK6812, TM1809, UCS1903, etc.), FastLED automatically uses the generic clockless driver which supports all timing variants but with standard performance.
These drivers are based on the Silicon Labs ezWS2812 library and provide seamless FastLED API compatibility with enhanced performance for MG24-based boards.
Note: All I2S lanes must share the same chipset/timings. If per-lane timing differs, consider using the RMT driver instead.
FastLED supports virtually every LED chipset available:
| Clockless (3-wire) | SPI-based (4-wire) | Specialty |
|---|---|---|
| WS281x Family: WS2811, WS2812 (NeoPixel), WS2812-V5B, WS2815 | APA102 / DotStars: Including HD107s (40MHz turbo) | SmartMatrix Panels |
| TM180x Series: TM1809/4, TM1803 | High-Speed SPI: LPD8806, WS2801, SM16716 | DMX Output |
| Other 3-wire: UCS1903, GW6205, SM16824E | APA102HD: Driver-level gamma correction | P9813 Total Control |
RGBW Support: WS2816 and other white-channel LED strips • Overclocking: WS2812 up to 70% speed boost
More details: Chipset Reference Wiki
#define LED_TYPE APA102HD // Enables hardware gamma correction
void setup() {
FastLED.addLeds<LED_TYPE, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
}Read more: APA102 HD Documentation • Rust Implementation
Ready to contribute? FastLED welcomes code contributions, platform testing, documentation improvements, and community support.
🔧 Development Setup & Contributing Guide (Click to expand)
Zero pain setup - can be done from command line in seconds with uv or python:
Steps:
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/yourusername/FastLED.git - Test compilation:
bash compile <platform>(e.g.,bash compile unocompiles Blink by default) - Make your changes and test
- Push to your fork and create a pull request
See our detailed Contributing Guide for more information.
Use the compile script to test on 20+ platforms:
- Teensy series, ESP32 variants, Arduino family, ARM boards, and more
- Automated testing ensures compatibility across all supported platforms
| 📋 How to Help | 🔗 Resources |
|---|---|
| Code contributions: Bug fixes, new features, optimizations | Contributing Guide |
| Platform support: Help test on new/existing platforms | Platform Testing |
| Documentation: Improve examples, fix typos, add tutorials | Documentation |
| Community: Answer questions on Reddit, report issues | r/FastLED |
Platform Porting: Information on porting FastLED to new platforms: PORTING.md
What's in the name? Originally "FastSPI_LED" focused on high-speed SPI, but evolved to support all LED types and became "FastLED" - everything fast, for LEDs.
Official Site: fastled.io - documentation, issues, and news
In Memory of Daniel Garcia Daniel Garcia, the brilliant founder of FastLED, tragically passed away in September 2019 in the Conception dive boat fire alongside his partner, Yulia. This heartbreaking loss was felt deeply by the maker and developer community, where Daniel's contributions had left an indelible mark.
Daniel was more than just a talented programmer; he was a passionate innovator who transformed the way creators interacted with LED technology. His work on FastLED brought high-performance LED control to countless projects, empowering developers to craft breathtaking installations.
In his personal life, Daniel was known for his kindness and creativity. His pride in FastLED and the vibrant community it fostered was a testament to his dedication to open-source development and his commitment to helping others bring light into the world.
While Daniel is no longer with us, his legacy continues through the FastLED library and the countless makers who use it. The community he built serves as a living tribute to his ingenuity, generosity, and the joy he found in sharing his work with the world.
Zach Vorhies, the current main contributor to FastLED, briefly worked with Dan in 2014 in San Francisco and was an avid user of the FastLED library for over 13 years. After Daniel Garcia’s untimely passing, Zach stepped up to ensure FastLED’s continued growth and development.
Zach has this to say about FastLED:
"The true power of FastLED lies in its ability to transform programmers into LED artists. Free space becomes their canvas; bending light is their medium. FastLED is a collective effort by programmers who want to manifest the world that science fiction writers promised us. -- To contribute code to FastLED is to leave behind a piece of something immortal."
💫 In memory of Daniel Garcia and the vision that transforms programmers into LED artists
To stay updated on the latest feature releases, please click the Watch button in the upper right
""










