🛠 Pilotez la LED RGB embarquée avec le périphérique RMT

ESP32-H2 · debutant · Schéma : IMG-esp32-h2-debutant-2-h2-led-rgb-rmt-gpio8.svg — Bloc RMT du H2 générant la trame WS2812 envoyée sur GPIO8 vers la LED RGB adressable du DevKitM-1, avec badge strapping sur GPIO8.

On the ESP32-H2-DevKitM-1, the onboard LED is an addressable RGB LED (WS2812 type) wired to GPIO8 and driven by the RMT peripheral — not a simple GPIO. Tutorial: cycle through red, green, and blue using ESP-IDF (v5.1 minimum, target esp32h2), inspired by examples/get-started/blink: create an RMT TX channel on GPIO8 (resolution around 10 MHz), attach an RGB888 encoder compatible with WS2812, then send the pixels in the GRB order expected by this type of LED. Two hardware precautions: GPIO8 is a strapping pin (along with GPIO9 and GPIO25) and only the LED should be connected to it, otherwise the boot mode becomes random; and since GPIO0–5 and GPIO22–27 are dead during deep-sleep, keep this constraint in mind when choosing your pins. The RMT/LEDC encoder APIs evolve between ESP-IDF releases: copy the official example for your version rather than relying on an old blog post. >

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials