RMT-LED-Control-on-ESP32

Generate precise RMT pulse sequences for WS2812B, APA102, and SK6812 LEDs on ESP32.

15|1|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/synqing/K1.hardware --skill rmt-led-control-on-esp32
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: RMT-LED-Control-on-ESP32
Source: https://github.com/synqing/K1.hardware/tree/main/.claude/skills/RMT-LED-Control
Command: npx skills add https://github.com/synqing/K1.hardware --skill rmt-led-control-on-esp32

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Driving addressable LEDs like WS2812B requires extremely precise timing, which can be challenging for microcontrollers with other tasks. This Skill leverages the ESP32's RMT (Remote Control) peripheral to generate nanosecond-accurate pulse sequences, ensuring perfect LED timing without CPU intervention, eliminating flicker and timing glitches for flawless visual effects.

Core Features & Use Cases

  • Cycle-Accurate Timing: Utilize hardware-driven RMT for precise control of WS2812B, APA102, and SK6812 LEDs.
  • DMA-Capable Output: Offload LED data transmission from the CPU, enabling high-speed updates for large LED arrays.
  • Multi-Channel Control: Configure up to 8 simultaneous LED lines for complex setups.
  • Use Case: Build high-density LED displays, create professional-grade light art installations, or ensure reliable LED feedback in real-time embedded systems where timing is critical.

Quick Start

Minimal WS2812B setup using RMT

#define LED_PIN GPIO_NUM_9 #define NUM_LEDS 100 rmt_config_t config = { .rmt_mode = RMT_MODE_TX, .channel = RMT_CHANNEL_0, .clk_div = 8, .gpio_num = LED_PIN, .mem_block_num = 1, .tx_config = { .loop_en = false, .carrier_en = false, .idle_level = RMT_IDLE_LEVEL_LOW, .idle_output_en = true, } }; rmt_config(&config); rmt_driver_install(RMT_CHANNEL_0, 0, 0);

Frequently Asked Questions about RMT-LED-Control-on-ESP32

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

FAQPage Schema
How do I achieve precise timing for WS2812B LED control on ESP32?

WS2812B LEDs require nanosecond-accurate pulse timing. The ESP32's RMT peripheral generates hardware-timed sequences without CPU intervention, eliminating flicker and timing glitches by offloading transmission to a dedicated hardware block.

Can I control multiple addressable LED lines simultaneously on ESP32?

Yes. The RMT peripheral supports up to 8 simultaneous channels, enabling multi-line LED arrays and complex setups. DMA-backed data streams handle high-speed updates for large LED displays without CPU overhead.

What addressable LED types work with ESP32 RMT timing control?

RMT supports WS2812B, APA102, and SK6812 LEDs. Each protocol has specific timing budgets and color encoding requirements that RMT's cycle-accurate output satisfies, ensuring reliable reset handling across all three formats.

Why use RMT instead of bit-banging LED data on ESP32?

RMT provides cycle-accurate hardware timing immune to CPU interrupts and task scheduling. Bit-banging is CPU-dependent and vulnerable to timing jitter; RMT's dedicated peripheral guarantees the nanosecond precision addressable LEDs demand.

Does RMT LED control work with large LED arrays and real-time systems?

Yes. DMA-capable output and interrupt-safe hardware timing make RMT suitable for high-density LED displays and embedded systems where timing reliability is critical. Multi-channel support scales to complex installations without CPU load.