FastLED 3.9.15
|
This document maps the example sketches, shows how to run them on different targets (Arduino/PlatformIO, Teensy, ESP32, WASM), and suggests learning paths. It mirrors the structure and tone of src/fl/README.md
so you can quickly jump between concepts and runnable code.
The examples/
directory contains runnable sketches that cover:
Typical first steps:
NUM_LEDS
, chipset, and DATA_PIN
to match hardware.ino
file directly (e.g., examples/Blink/Blink.ino
)FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS)
NUM_LEDS
FastLED.setBrightness(…)
Tips:
WIDTH
/HEIGHT
and confirm wiring (serpentine vs. linear)platformio.ini
that targets your MCU and copy an example sketch into a project src/
foldersrc/platforms/stub/
The repository includes ci/native/
and ci/kitchensink/
PlatformIO configs you can reference for host builds and integration tests.
examples/OctoWS2811*
and related Teensy demos show multi-output patternsexamples/EspI2SDemo/
and examples/Esp32S3I2SDemo/
examples/wasm/
and related WASM-focused examples run in the browsersrc/platforms/wasm
and src/fl/ui.h
)This list highlights commonly used examples. It is not exhaustive—browse the folders for more.
Blink/
— minimal starting pointFirstLight/
— walk a single bright pixel along the stripPinMode/
— simple input pin usageRGBSetDemo/
— basic pixel addressing and assignmentRGBCalibrate/
— adjust color channel balanceColorPalette/
— palette usage and transitionsColorTemperature/
— white point and temperature helpersHSVTest/
— HSV types and conversionsColorBoost/
— saturation/luminance shaping for high visual impactCylon/
, FxCylon/
— scanning eye; FX variants use higher-level helpersFire2012/
, Fire2012WithPalette/
, FxFire2012/
— classic fire effectTwinkleFox/
, FxTwinkleFox/
— twinkling star fieldsPride2015/
, FxPride2015/
— rainbow variantsDemoReel100/
, FxDemoReel100/
— rotating showcase of many patternsWave/
— 1D wave toolkitXYMatrix/
— matrix mapping helpers and layoutsWave2d/
, FxWave2d/
— 2D wavefieldsBlur2d/
— separable blur across a matrixDownscale/
— render high-res, resample to panel resolutionAnimartrix/
— animated matrix patterns and helpersSmartMatrix/
— SmartMatrix integration sketchFxEngine/
— scaffolding for composing layers and framesFxGfx2Video/
— utilities to pipe graphics into frame/video helpersfx/
under src/
provides the building blocks used by these examplesAudio/
— audio input + analysis (simple and advanced variants)Ports/PJRCSpectrumAnalyzer/
— Teensy-centric spectrum analyzerFxSdCard/
— SD-backed media and assets (see data/
subfolder)Multiple/
— organize multiple arrays/segmentsTeensyParallel/
— multi-output exampleTeensyMassiveParallel/
— larger multi-output wiringOctoWS2811/
, OctoWS2811Demo/
— OctoWS2811 multi-channel outputEspI2SDemo/
, Esp32S3I2SDemo/
— ESP32 parallel/I2S outputSmartMatrix/
— run on SmartMatrix hardwarewasm/
— browser-targeted demoWasmScreenCoords/
— UI overlay and coordinate visualizationJson/
— JSON-structured sketch exampleUITest/
— showcase of JSON UI controls and groupsLuminescentGrand/
— complex, multi-file installation pieceLuminova/
— larger effect setChromancer/
— advanced example with assets and helpersNUM_LEDS
to match your hardware:
FastLED.setBrightness(…)
and consider power limits for dense stripsWIDTH
/HEIGHT
and use serpentine or row-major helpers; verify orientationfl::Leds
+ XYMap
for 2D logic when the example exposes those hooksdownscale
Blink
→ FirstLight
→ DemoReel100
ColorPalette
and ColorTemperature
Cylon
, Fire2012
, TwinkleFox
XYMatrix
, then try Downscale
or Wave2d
OctoWS2811Demo
, TeensyParallel
wasm
, UITest
, Json
Corkscrew
(in src/fl
), Fx*
examples, and Chromancer
DATA_PIN
, chipset, and COLOR_ORDER
NUM_LEDS
and power are correct; try a low brightness firstGRB
vs. RGB
ordering; some strips invert green/redWIDTH
and HEIGHT
FastLED.h
, pick your chipset, set NUM_LEDS
, and get something simple running firstfill_rainbow
and CHSV
src/fl/
and src/fx/
fl::
containers, views (fl::span
), and graphics helpers for portability and qualitysrc/fl/ui.h
) and WASM bridge (src/platforms/wasm
)This README will evolve alongside the examples. Browse subfolders for sketch-specific notes and hardware details. For the core library map and deeper subsystems, see src/README.md
and src/fl/README.md
.