FastLED

Solve addressable LED control challenges using the FastLED library.

15|1|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/synqing/K1.hardware --skill fastled
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: FastLED
Source: https://github.com/synqing/K1.hardware/tree/main/.claude/skills/FastLED
Command: npx skills add https://github.com/synqing/K1.hardware --skill fastled

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Controlling addressable LED strips (like WS2812B) with microcontrollers can be complex, involving precise timing, color management, and effect generation. This Skill provides comprehensive documentation and best practices for the FastLED library, simplifying LED control, enabling stunning visual effects, and optimizing performance for your projects.

Core Features & Use Cases

  • LED Control: Master the basics of setting up and controlling various addressable LED types.
  • Color Management: Understand and apply different color spaces (RGB, HSV) for vibrant and smooth animations.
  • Effect Generation: Learn how to create dynamic and engaging LED patterns with built-in functions and custom code.
  • Use Case: Quickly get started with a new LED project, debug unexpected color behavior, or find optimized ways to render complex animations on your Arduino or ESP32.

Quick Start

Example: Basic FastLED setup

#include <FastLED.h> #define NUM_LEDS 60 #define DATA_PIN 3 CRGB leds[NUM_LEDS]; void setup() { FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS); FastLED.setBrightness(50); } void loop() { leds[0] = CRGB::Red; FastLED.show(); delay(500); leds[0] = CRGB::Black; FastLED.show(); delay(500); }

Frequently Asked Questions about FastLED

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I control addressable LED strips like WS2812B with Arduino or ESP32?

Addressable LED control involves setting up the FastLED library, defining your LED type and data pin, then sending color commands to individual LEDs. FastLED handles precise timing and protocol details for WS2812B and similar RGB LEDs, letting you light specific LEDs and update them with FastLED.show().

What's the difference between RGB and HSV color spaces for LED animations?

RGB specifies colors as red, green, and blue intensity values; HSV uses hue, saturation, and value for more intuitive color and brightness control. FastLED supports both, and HSV often makes smooth color transitions and animations easier to code and reason about.

How do I create LED effects and patterns on a microcontroller?

LED effects combine color changes, timing loops, and FastLED functions to generate patterns like fades, pulses, or chases. FastLED provides built-in color utilities and functions; you loop through LEDs, update colors, and call FastLED.show() to display each frame.

Can I use FastLED with ESP32 and Arduino boards?

Yes, FastLED supports both ESP32 and Arduino microcontrollers. It adapts to each board's pin configuration and hardware; you specify your board type and data pin when setting up FastLED.addLeds(), and the library handles platform-specific timing and communication.

Why are my LED colors wrong or flickering?

Color issues often stem from incorrect color-order configuration (RGB vs GRB), insufficient power, timing problems, or brightness settings that exceed the LED strip's capacity. FastLED requires precise color-order matching and brightness management to render accurate, stable colors.

How do I optimize LED animations for memory and performance on constrained microcontrollers?

Optimize by minimizing LED array size, reusing color variables, avoiding nested loops, and using efficient FastLED color functions instead of manual bit math. Profile your code to identify bottlenecks and balance animation complexity against available RAM and CPU cycles.