Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

WS2812B LED strip with Seeed XIAO ESP32S3

Drive a WS2812B strip from D1 of a Seeed XIAO ESP32S3 through 330 Ω, with its own 5 V supply and a common ground — and why not from the XIAO’s 5V pin.

Arduino C++Verified — core esp32 3.3.12, Adafruit NeoPixel 1.15.5, 3 Nov 2026Compile-only

Community draft — report a mistake

A XIAO ESP32S3 can drive hundreds of WS2812B LEDs; what it can’t do is power them. Send data from D1 through 330 Ω, and give the strip its own 5 V adapter with the grounds joined.

The sketch runs a rainbow at about 25 % brightness.

Wiring

XIAO ESP32S3Only the pins used are shown · 3.3 V logic5 V 2 A adapterWS2812B addressable RGB LED strip (NeoPixel)330 Ω+5VGNDD1GNDDIN5VGNDDOUT (not connected)
Also needed: 330 Ω resistor, 1000 µF / 10 V capacitor, 5 V 2 A adapter.
Every connection
XIAO ESP32S3WS2812B addressable RGB LED strip (NeoPixel)WireNotes
D1DINgreenVia 330 Ω
5 V 2 A adapter · +5V5Vred1000 µF capacitor across 5V/GND at the strip.
5 V 2 A adapter · GNDGNDblack
GNDGNDblackCommon ground with the XIAO.

5 V (about 60 mA per LED at full white) part, 3.3 V board. The strip expects a data HIGH of about 3.5 V at 5 V supply. From ESP32 or Pico the 3.3 V signal often works with short wires, but to be safe drive DIN through a 74AHCT125 (or 74HCT125) powered from 5 V.

Board quirks

  • The XIAO S3’s 5V pin is USB VBUS — fine for a few LEDs, but it reads 0 V on battery and feeding 5 V back into it needs a diode. A separate supply avoids both problems.
  • D1 (GPIO2) has no boot role. On the Sense board avoid D8–D10, which the SD-card slot shares.
  • The XIAO S3 has no on-board RGB LED, only the orange user LED on GPIO21.

Code

ws2812b-xiaos3.inoArduino C++Open in PlaygroundOpen in PlaygroundFlash
// WS2812B strip on a Seeed XIAO ESP32S3.
// DIN → D1 (GPIO2) through 330 Ω. Strip 5V/GND → its own 5 V supply; supply GND → XIAO GND.
#include <Adafruit_NeoPixel.h>

constexpr uint16_t COUNT = 30;
Adafruit_NeoPixel strip(COUNT, D1, NEO_GRB + NEO_KHZ800);

void setup() {
  Serial.begin(115200);
  uint32_t t0 = millis();
  while (!Serial && millis() - t0 < 3000) {}
  strip.begin();
  strip.setBrightness(60);
  strip.show();
  Serial.printf("WS2812B: %u LEDs on D1\n", COUNT);
}

void loop() {
  static uint16_t hue = 0;
  for (uint16_t i = 0; i < COUNT; i++) {
    strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(hue + i * 65536UL / COUNT)));
  }
  strip.show();
  hue += 256;
  delay(20);
}

Library: Adafruit NeoPixel (Adafruit) — compiled with Adafruit NeoPixel 1.15.5.

Expected serial output

Serial Monitor · 115200Output
WS2812B: 30 LEDs on D1

Common errors

Nothing lights

Missing common GND, or data into DOUT. The arrows on the strip point away from DIN.

XIAO resets at full brightness

The strip is sharing the XIAO’s supply. Brownout fix.

↑↓ to move · Enter to open