D-names and GPIO numbers
D0 to D3 are GPIO 2 to 5, D4 and D5 are GPIO 6 and 7 (default I²C), D6 and D7 are GPIO 21 and 20 (UART), and D8 to D10 are GPIO 8 to 10 (default SPI). With the XIAO_ESP32C3 board selected in Arduino-ESP32, the D0 to D10 constants give the right GPIO.
Strapping pins on D0, D8 and D9
Seeed warns that GPIO2 (D0), GPIO8 (D8) and GPIO9 (D9) are strapping pins: a circuit that holds them at the wrong level at power-up can stop the board from starting or from accepting uploads. GPIO9 is also the BOOT button. They work normally once the program runs, so use them for outputs or SPI rather than for sensors that drive the line at power-up.
| GPIO | Default at reset | What it selects | In practice |
|---|---|---|---|
| 2 | Floating | Not part of the boot choice, but Espressif recommends a pull-up | Keep it HIGH at reset |
| 8 | Floating | Must be HIGH to enter download mode | Don’t hold it LOW at power-up |
| 9 | Weak pull-up (HIGH) | Boot mode: HIGH runs the program, LOW enters download mode | BOOT button; nothing else may hold it LOW |
Analog pins and deep sleep
D0, D1 and D2 (GPIO 2 to 4) are on ADC1. D3 (GPIO5) is on ADC2, which ESP-IDF and Arduino-ESP32 don’t support on the ESP32-C3, so use D0 to D2 for analog readings. Only GPIO 0 to 5 can wake the chip from deep sleep, which on this board means D0 to D3.
Power, battery and LED
The board runs from USB-C or from a 3.7 V lithium battery, which it charges at up to 380 mA. Seeed gives 500 mA for the 3.3 V output in its specifications (700 mA in another part of the same page) and about 44 µA in deep sleep. There is no user LED: the small LED near the USB connector shows charging.
Full XIAO ESP32C3 pin table
| Pin | GPIO | Status | Analog | Functions | Notes |
|---|---|---|---|---|---|
| D0 | GPIO2 | Use with care | ADC1_CH2 | RTC_GPIO2, PWM (LEDC) | strapping |
| D1 | GPIO3 | Free to use | ADC1_CH3 | RTC_GPIO3, PWM (LEDC) | No restrictions |
| D2 | GPIO4 | Free to use | ADC1_CH4 | RTC_GPIO4, PWM (LEDC), MTMS (JTAG) | JTAG |
| D3 | GPIO5 | Free to use | ADC2_CH0 | RTC_GPIO5, PWM (LEDC), MTDI (JTAG) | ADC2 not supported, JTAG |
| D4 | GPIO6 | Free to use | No | PWM (LEDC), MTCK (JTAG) | JTAG, I²C SDA |
| D5 | GPIO7 | Free to use | No | PWM (LEDC), MTDO (JTAG) | JTAG, I²C SCL |
| D8 | GPIO8 | Use with care | No | PWM (LEDC) | strapping, SPI SCK |
| D9 | GPIO9 | Use with care | No | PWM (LEDC) | strapping, BOOT button, SPI MISO (RX) |
| D10 | GPIO10 | Free to use | No | PWM (LEDC) | SPI MOSI (TX) |
| D7 | GPIO20 | Use with care | No | PWM (LEDC), U0RXD | UART0, UART RX |
| D6 | GPIO21 | Use with care | No | PWM (LEDC), U0TXD | UART0, UART TX |
Arduino-ESP32 defaults for the XIAO ESP32C3: I²C on D4 (SDA) and D5 (SCL), SPI on D8 (SCK), D9 (MISO) and D10 (MOSI), UART on D6 (TX) and D7 (RX). The GPIO matrix can move them to other pads.
Frequently asked questions
Does the XIAO ESP32C3 have a built-in LED?
No user LED. Seeed’s wiki says LED_BUILTIN isn’t available on this board, and the LED near the USB connector only shows battery charging. Connect an LED with a resistor to a free pad, such as D10.
Which XIAO ESP32C3 pins are analog?
D0, D1 and D2 (GPIO 2, 3 and 4), on ADC1. D3 is on ADC2, which isn’t supported on the ESP32-C3.
Why won’t my XIAO ESP32C3 start with a sensor on D9?
D9 is GPIO9, a strapping pin with the BOOT button: if the sensor pulls it LOW at power-up, the chip starts in download mode. Move the sensor to another pad, or make sure the line stays HIGH at reset.
Can I power the XIAO ESP32C3 from a battery?
Yes, from a 3.7 V lithium battery connected to the battery pads. The board charges it from USB-C at up to 380 mA.
Are the XIAO ESP32C3 pins 5 V tolerant?
No. The ESP32-C3 GPIOs work at 3.3 V. The 5V pad is a power pin, not a signal input.