WS2812B RGB Matrix 8×8 with an ESP32 DevKit V1
An 8x8 grid of 64 chainable WS2812B RGB LEDs, each with a built-in controller, driven over a single 5V data wire.

The 8x8 WS2812B matrix is 64 pixels on one data line: on the ESP32 DevKit V1 it takes 5 V from VIN and data from GPIO13 through a 74AHCT125 buffer and a 470 Ohm resistor. Its power, not its data, decides how bright you can run it from this board.
Wiring the WS2812B RGB Matrix 8×8 to the ESP32 DevKit V1
Pin by pin.
| WS2812B RGB Matrix 8×8 | ESP32 DevKit V1 | Note |
|---|---|---|
| VCC | VIN | |
| GND | GND | |
| DIN | GPIO13 (D13) | through a 74AHCT125 buffer powered from 5 V, then the 470 Ω resistor: the WS2812B reads a high from 0.7 × VDD (3.5 V), above a 3.3 V pin |
- VCC is on VIN, which gives about 5 V only while the board is powered from USB.
- At full brightness the 64 pixels draw up to about 3.84 A (60 mA each at full white), far more than USB gives through the board. The sketch caps brightness at 25 of 255, about 0.38 A. To go brighter, power VCC from its own 5 V supply rated 4 A or more and join its GND to the board's.
What to know on the ESP32 DevKit V1
- All 64 pixels at full white draw about 3.84 A, far beyond what VIN can pass from USB, where the ESP32 itself needs about 240 mA for Wi-Fi transmit. The sketch's setBrightness(25), about 0.38 A at full white, is what makes USB power workable; above that, feed the matrix from a 5 V supply with grounds joined.Adafruit NeoPixel Uberguide, Powering NeoPixels (60 mA per pixel); Espressif ESP32 Series Datasheet v5.3, p. 52
- The WS2812B wants a data high of 0.7 x VDD, 3.5 V on 5 V, above GPIO13's 3.3 V. The page's wiring puts a 74AHCT125, powered from 5 V, between GPIO13 and the resistor to make it reliable.WS2812B datasheet, p. 3
- Adafruit NeoPixel sends the 64-pixel frame through the ESP32's RMT peripheral, so Wi-Fi interrupts do not break the pixel timing.Espressif ESP32 Series Datasheet v5.3, p. 38
WS2812B RGB Matrix 8×8 code for the ESP32 DevKit V1
Compiled for esp32:esp32:esp32 on 2026-10-30.
// WS2812B RGB Matrix 8×8 on ESP32 DevKit V1: wiring and a free simulation at https://www.tinkered.ai/components/ws2812b-matrix-8x8/esp32
#include <Adafruit_NeoPixel.h>
#define LED_PIN 13
#define WIDTH 8
#define HEIGHT 8
#define LED_COUNT (WIDTH * HEIGHT) // 64
Adafruit_NeoPixel matrix(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
// Row-major: pixel index for grid (x, y), y=0 is the top row.
inline uint16_t xy(uint8_t x, uint8_t y) { return y * WIDTH + x; }
void setup() {
matrix.begin();
matrix.setBrightness(25); // 25 of 255: full white then draws about 0.38 A, inside USB's 500 mA; raise it only on an external 5 V supply
matrix.show(); // all off
}
void loop() {
static uint16_t t = 0;
for (uint8_t y = 0; y < HEIGHT; y++) {
for (uint8_t x = 0; x < WIDTH; x++) {
uint16_t hue = t + (uint16_t)(x + y) * (65536 / (WIDTH + HEIGHT));
matrix.setPixelColor(xy(x, y), matrix.gamma32(matrix.ColorHSV(hue)));
}
}
matrix.show();
t += 512;
delay(30);
}
WS2812B RGB Matrix 8×8 on the ESP32 DevKit V1: questions
Can an ESP32 power an 8x8 WS2812B matrix from USB?
Only at low brightness, as the sketch's setBrightness(25) does. Full white is about 3.84 A; use a 5 V supply rated for it, with its ground tied to the DevKit's GND.
Does the 8x8 matrix need a level shifter on the ESP32?
For reliability, yes: its data input expects 0.7 x VDD, 3.5 V on 5 V (WS2812B datasheet, p. 3). Many panels work without one on a short wire, but the page wires a 74AHCT125 buffer in.
Keep going
This guide as plain Markdown. /components/ws2812b-matrix-8x8/esp32.md