Hi there,
And Welcome here…
So I won’t assume you mean a full Dev Kit C6 but a Xiao
YMMV I follow this basic understanding. The DEV-Kit C (C6) is different because of the size…just fyi.
Xiao ESP32C6 Safe I/O Pin Reference Table
Label | GPIO | Safe for I/O? | Notes |
---|---|---|---|
D0 | 0 | ![]() |
Boot pin – LOW to enter flash mode; don’t use as output |
D1 | 1 | ![]() |
SPI Flash pin – Do not use |
D2 | 2 | ![]() |
SPI Flash |
D3 | 3 | ![]() |
SPI Flash |
D4 | 4 | ![]() |
SPI Flash |
D5 | 5 | ![]() |
Safe for I/O |
D6 | 6 | ![]() |
Safe |
D7 | 7 | ![]() |
Safe |
D8 | 8 | ![]() |
Safe |
D9 | 9 | ![]() |
Safe |
D10 | 10 | ![]() |
Safe |
A0 | 1 | ![]() |
Same as D1 — do not use |
A1 | 0 | ![]() |
Same as D0 — boot pin |
A2 | 2 | ![]() |
Same as D2 — SPI Flash |
A3 | 3 | ![]() |
Same as D3 — SPI Flash |
3V3 | — | Power only | 3.3V output |
5V | — | Power only | USB input (not from LDO) |
GND | — | Ground | Common ground |
Use These Xiao ESP32C6 Pins for I/O:
- D5, D6, D7, D8, D9, D10 → Fully safe for digital I/O, PWM, etc.
- GPIOs 5–10 are your reliable workhorses.
- Avoid D0–D4 due to boot functions or flash interference.
Tip for Analog / PWM:
If you’re using analog input/output:
- ADC works best on D5–D10
- For PWM, all those safe GPIOs support LEDC PWM channels
for this…for example
pinMode(D5, OUTPUT);
digitalWrite(D5, HIGH); // Safe and solid
for Analog in Basic,
int sensor = analogRead(D9); // Works fine on safe GPIO
Why This Matters
- Pins D1–D4 interfere with flash memory or USB/JTAG, which can brick or destabilize your board.
- Using the safe GPIOs (5–10) ensures reliability and avoids subtle bugs.
- Leveraging GPIOs like 14 and 15 gives you control over antenna switching and onboard LEDs.
HTH
GL PJ