Seeed Studio's XIAO ESP32C3 puts a Wi-Fi and Bluetooth LE microcontroller on a 21 × 17.8 mm board, about the size of a thumbnail, with a LiPo charger built in. It's the same ESP32-C3 chip as a full-size devkit, but only 11 of its GPIOs reach the header, so knowing which ones are safe matters more than usual.
Quick answer: the header gives you D0–D10 (11 GPIOs), A0–A3 for analog, I2C on D4/D5, UART on D6/D7 and SPI on D8/D9/D10. Three pins are strapping pins: D0 (GPIO2), D8 (GPIO8) and D9 (GPIO9). Keep them from being pulled low at reset. For general wiring, start with D1, D2, D3 and D10. For analog, use A0–A2; A3 sits on the ESP32-C3's unreliable ADC2.
What you'll find here: the full D-pin to GPIO map, which pins to avoid, the analog limits, the default bus pins, battery and power wiring, deep-sleep wake pins, and fixes for the problems people hit most often with this board.
Highlighted on the SolderHub Simulator Seeed Studio XIAO ESP32C3. Explore every pin on the Seeed Studio XIAO ESP32C3 board page.
XIAO ESP32C3 Pin Map: D-Pin to GPIO
The header has 14 pins at 2.54 mm pitch: 11 GPIOs plus 5V, GND and 3V3. In the Arduino IDE, with the XIAO_ESP32C3 board selected, you can use either the silkscreen name (D2) or the GPIO number (4); they refer to the same pin.
| Pin | GPIO | Analog | Default role | Notes |
|---|---|---|---|---|
| D0 | GPIO2 | A0 (ADC1) | — | Strapping pin; deep-sleep wake capable |
| D1 | GPIO3 | A1 (ADC1) | — | Safe; deep-sleep wake capable |
| D2 | GPIO4 | A2 (ADC1) | — | Safe; deep-sleep wake capable |
| D3 | GPIO5 | A3 (ADC2) | — | Safe for digital; analog unreliable; wake capable |
| D4 | GPIO6 | — | I2C SDA | |
| D5 | GPIO7 | — | I2C SCL | |
| D6 | GPIO21 | — | UART TX | Serial1 TX |
| D7 | GPIO20 | — | UART RX | Serial1 RX |
| D8 | GPIO8 | — | SPI SCK | Strapping pin |
| D9 | GPIO9 | — | SPI MISO | Strapping pin; wired to the BOOT button |
| D10 | GPIO10 | — | SPI MOSI | Safe |
There's no dedicated SPI chip-select pin; pick any free GPIO and pass it to your library. There's also no user LED on this board: the only LED is the charge indicator, so a blink sketch needs an external LED and resistor.
const int LED = D10; // external LED + 220 Ω resistor to GND
void setup() { pinMode(LED, OUTPUT); }
void loop() {
digitalWrite(LED, HIGH); delay(500);
digitalWrite(LED, LOW); delay(500);
}The Three Strapping Pins
The ESP32-C3 reads GPIO2, GPIO8 and GPIO9 at reset to decide how to boot. On the XIAO they're D0, D8 and D9:
- D9 (GPIO9) is the BOOT button. Held LOW at reset, the chip enters download mode instead of running your sketch. A button or sensor that pulls D9 low at power-up will stop the board from starting.
- D8 (GPIO8) must be HIGH for serial download to work. Don't hang a pull-down or a module with a low default on it.
- D0 (GPIO2) should also be HIGH at reset. Avoid pull-downs there.
All three work normally as outputs or inputs once the sketch is running. The rule is only about what's connected to them at the moment of reset. D8 and D9 are also the default SPI pins, which is fine: SPI devices don't pull SCK or MISO low at reset in normal use.
Highlighted on the SolderHub Simulator Seeed Studio XIAO ESP32C3. Explore every pin on the Seeed Studio XIAO ESP32C3 board page.
USB
The USB-C port uses the ESP32-C3's built-in USB Serial/JTAG controller, not any header pin. To see Serial.print() output in the Serial Monitor, set Tools → USB CDC On Boot → Enabled in the Arduino IDE; with it disabled, Serial goes to D6/D7 instead and the monitor stays blank.
Analog Pins (A0–A3)
Four pins can read analog voltages with the 12-bit ADC, but they aren't equal:
- A0, A1, A2 (D0–D2) are on ADC1. Use these.
- A3 (D3) is on ADC2. Espressif's errata for the ESP32-C3 says ADC2 can return wrong readings, and Seeed recommends ADC1 for anything that matters. Treat A3 as a digital pin.
The usable input range is about 0–2.5 V at the default attenuation, not the full 3.3 V. Above that the reading saturates. Divide larger signals down first, and use analogReadMilliVolts(), which applies the chip's factory calibration:
int raw = analogRead(A0); // 0–4095
int mv = analogReadMilliVolts(A0); // calibrated millivoltsWith only three dependable analog inputs, prefer I2C sensors where one exists (a BME280 rather than an analog thermistor, for example) and keep the ADC pins for things that are only analog. For the ADC behaviour across the ESP32 family, see ESP32 ADC pins: ADC1 vs ADC2.
Highlighted on the SolderHub Simulator Seeed Studio XIAO ESP32C3. Explore every pin on the Seeed Studio XIAO ESP32C3 board page.
PWM
Every GPIO can output PWM through the LEDC peripheral. analogWrite() works for quick dimming; ledcAttach() (Arduino-ESP32 core 3.x) gives you control of frequency and resolution, which matters for servos and quiet motor drives:
analogWrite(D2, 128); // ~50% duty
ledcAttach(D3, 50, 12); // servo: 50 Hz, 12-bit
ledcWrite(D3, 307); // ~1.5 ms pulse (centre)I2C, UART and SPI
I2C defaults to D4 (SDA) and D5 (SCL), so Wire.begin() with no arguments uses them, and Seeed's XIAO expansion boards and Grove shields expect them. The header has no pull-up resistors; most breakout modules include their own. Full details, including multiple devices on one bus, are in ESP32 I2C pins.
Wire.begin(); // D4 = SDA, D5 = SCLUART Serial1 is on D6 (TX) and D7 (RX). Use it for a GPS module, a second microcontroller or an RS-485 adapter. Cross the wires: XIAO TX to the device's RX.
Serial1.begin(9600, SERIAL_8N1, D7, D6); // RX, TXSPI uses D8 (SCK), D9 (MISO) and D10 (MOSI), with chip-select on any free pin. A display that only receives data can leave MISO unconnected, which keeps the BOOT pin (D9) completely free.
SPI.begin(D8, D9, D10, D3); // SCK, MISO, MOSI, CSHighlighted on the SolderHub Simulator Seeed Studio XIAO ESP32C3. Explore every pin on the Seeed Studio XIAO ESP32C3 board page.
Battery Charging and Power
The XIAO ESP32C3 has a single-cell LiPo charger on board. There's no battery connector: solder the battery leads to the BAT+ and BAT− pads on the underside, red to BAT+. When USB is plugged in, the board runs from USB and charges the cell; unplug it and the board runs from the battery. The small LED next to the USB port shows charging.
| Pin / pad | What it is | Use it for |
|---|---|---|
| 5V | USB VBUS | Powering 5 V modules while on USB, or feeding the board a regulated 5 V |
| 3V3 | Regulator output | Powering 3.3 V sensors and modules |
| GND | Ground | Common ground for everything |
| BAT+ / BAT− | Battery pads (underside) | One 3.7 V LiPo cell, with its own protection circuit |
Three things catch people out:
- On battery, the 5V pin is not 5 V. It only carries USB power. A 5 V module powered from it will stop working when the cable is unplugged.
- There's no battery-voltage pin. To monitor the cell, add a divider from BAT+ to A0 (two equal resistors, e.g. 2 × 220 kΩ) and double the reading. High values keep the drain on the battery small.
- Use a protected cell. Pick a LiPo with a built-in protection board, check the polarity twice before soldering, and never use an unprotected cell in a wearable.
// Battery voltage through a 1:1 divider on A0
float vbat = analogReadMilliVolts(A0) * 2 / 1000.0;Highlighted on the SolderHub Simulator Seeed Studio XIAO ESP32C3. Explore every pin on the Seeed Studio XIAO ESP32C3 board page.
Wi-Fi, Bluetooth and the Antenna
The radio is the standard ESP32-C3 set: 2.4 GHz Wi-Fi 4 (802.11 b/g/n) and Bluetooth 5 LE. There's no Classic Bluetooth, so libraries such as BluetoothSerial don't work; use BLE instead. There's no Zigbee or Thread either.
The board has no on-board chip antenna. It ships with a small flexible antenna that clips onto the U.FL connector, and Wi-Fi range is very poor without it. Press it on until it clicks, and route the antenna away from the battery and any metal in the enclosure.
#include <WiFi.h>
WiFi.begin("your-ssid", "your-password");For connection code with timeouts and reconnects, see the ESP32 Wi-Fi tutorial; for BLE, the ESP32 BLE scanner runs unchanged on this board.
Deep Sleep and Wake Pins
Seeed rates the board at about 44 µA in deep sleep. A board that wakes every 10 minutes, connects to Wi-Fi for a few seconds and goes back to sleep can run for weeks on a small LiPo; the radio-on time, not the sleep current, is what drains it.
Only GPIO0–GPIO5 can wake the ESP32-C3 from deep sleep, and of those the header exposes D0–D3 (GPIO2–GPIO5). Put a button or a PIR output on one of those pins if it needs to wake the board:
#include "esp_sleep.h"
void goToSleep() {
esp_deep_sleep_enable_gpio_wakeup(1ULL << 3, ESP_GPIO_WAKEUP_GPIO_LOW); // D1 pulled low
esp_sleep_enable_timer_wakeup(10ULL * 60 * 1000000); // or every 10 min
esp_deep_sleep_start();
}Two habits make the biggest difference: switch sensors off before sleeping (a module left powered from 3V3 can draw more than the chip itself), and keep Wi-Fi sessions short. The ESP32 deep sleep and battery life guide works through the numbers.
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| Serial Monitor shows nothing | Set USB CDC On Boot → Enabled, re-upload, and add delay(1000) after Serial.begin() |
| Port disappears or upload fails | Hold BOOT, tap RESET, release BOOT, then upload again |
| Board won't start with a circuit attached | Something is pulling D0, D8 or D9 low at reset; move it to D1–D3 or D10 |
| Wi-Fi won't connect or keeps dropping | Antenna not clipped on, or the network is 5 GHz only |
| Analog reading stuck at 4095 | The input is above ~2.5 V; add a divider |
| Analog reading erratic on A3 | ADC2 issue; move the signal to A0–A2 |
| 5 V module dies on battery | The 5V pin only has power on USB |
BluetoothSerial won't compile | The C3 has BLE only; use the BLE library |
Pin Planning Tips
- Plan the 11 pins on paper first. I2C (2) + UART (2) + SPI (3 + CS) already uses 8.
- Give inputs that might be held low at power-up, like buttons, to D1–D3, never D0, D8 or D9.
- Keep D4/D5 for I2C, so Seeed's expansion boards and example code just work.
- Run out of pins? Add an I2C GPIO expander (MCP23017 or PCF8574) on D4/D5 rather than moving to a bigger board.
XIAO ESP32C3 vs Other Small ESP32 Boards
| XIAO ESP32C3 | XIAO ESP32C6 | ESP32-C3 DevKitM-1 | |
|---|---|---|---|
| Header GPIOs | 11 | 11 | 15 |
| Reliable ADC pins | 3 (A0–A2) | 3 | 5 |
| Wi-Fi | Wi-Fi 4 | Wi-Fi 6 | Wi-Fi 4 |
| Bluetooth | BLE 5 | BLE 5 | BLE 5 |
| Zigbee / Thread | No | Yes | No |
| Battery charger | Yes | Yes | No |
| Antenna | External (U.FL, included) | On-board + U.FL | On-board |
| Size | 21 × 17.8 mm | 21 × 17.8 mm | Standard devkit |
Choose the XIAO ESP32C3 for a small, cheap, battery-powered Wi-Fi or BLE node: a plant-moisture sensor, a door sensor, a wearable, a BLE beacon. Choose the XIAO ESP32C6 if it has to join a Zigbee or Thread network or you want an on-board antenna. Choose a full-size ESP32-C3 board if you need more pins and don't need the battery charger; the ESP32-C3 pinout guide covers it, and the same code runs on both.
14 of 14 pins match
Hover or tap any pin on the board
LEFT header · pin 2
D1
Safe to use
Nothing else on the board depends on this pin. A good first choice for sensors, LEDs and buttons.
Can be used as
- PWM out
- Analog in
Signals on this pad
- GPIO3
- D1
- A1
- ADC1_CH3
Plan it on the virtual XIAO first. The SolderHub Simulator has the same XIAO ESP32C3 you see in these figures.
FAQ
How many GPIOs does the XIAO ESP32C3 have? 11 on the header, D0–D10. Three of them (D0, D8, D9) are strapping pins.
Which pins are safe for buttons and general wiring? D1, D2, D3 and D10. D4–D7 are fine too if you're not using I2C or UART.
Does it have a built-in LED? No user LED. The only LED shows battery charging. Wire your own to any GPIO.
What's the GPIO number of D10? GPIO10. The full map is in the table at the top of this guide.
Can I connect a LiPo battery? Yes. Solder a protected single-cell LiPo to the BAT+ and BAT− pads under the board; it charges whenever USB is connected.
Can I power it from 5 V? Yes, through USB-C or a regulated 5 V supply on the 5V pin. Don't feed the 5V pin while USB is also connected unless your supply is designed for it.
Does it support Bluetooth Classic? No, Bluetooth LE only.
Why is my Wi-Fi range so bad? The board needs its external antenna; there's no chip antenna on the PCB.
Is the code the same as for other ESP32-C3 boards? Yes. It's the same chip, so sketches move between boards once the pin numbers are adjusted.
Related guides: ESP32-C3 pinout · XIAO ESP32C6 pinout · XIAO RP2350 pinout · ESP32 deep sleep and battery life


