ESP32-C6 DevKitC pinout: J1 and J3, hole for hole
Beginner
Or see every lesson.
- 526parts on the bench
- 46boards running now
- 1.00xreal time, on every board
The ESP32-C6-DevKitC-1 is a RISC-V board from Espressif with thirty-one GPIOs and an addressable RGB LED on GPIO 8. It runs at 160 MHz with one instruction per cycle. This page lists every pin on both headers, tells you which pins do PWM and analog reads, and shows the default spots for I2C and SPI.
The headers follow the order in Espressif's user guide, antenna at the top. Each header has a sixteenth hole that is not connected, and Mokxi does not draw it. There is no GPIO 14 on either header. In a diagram the four ground pins are named GND, GNDb, GNDd and GNDc, top to bottom, so every pin name is unique.
Every pin on the board
The table has one row for each of the 32 holes of the ESP32-C6 DevKitC in Mokxi, in the order of the part's pin list, which follows the board's headers. A row that says "Not a GPIO" is a supply, a ground or a control pin, and a sketch cannot drive it.
Every row below is worked out from the same board model the simulator runs: the pin list, the Circuit Doctor's pin data and the default bus pins.
| Pin | Sketch name | What it can do | Watch out for |
|---|---|---|---|
| 3V3 | - | A 3.3 V power pin: 3V3. | Not a GPIO. |
| RST | - | The board's RST pin. | Not a GPIO. |
| 4 | 4 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 5 | 5 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 6 | 6 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 7 | 7 | Digital in and out. PWM. | 3.3 V logic. |
| 0 | 0 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 1 | 1 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 8 | 8 | Digital in and out. PWM. The on-board LED is on this pin. | 3.3 V logic. The board's own WS2812: an addressable RGB LED that wants a protocol, not a level. |
| 10 | 10 | Digital in and out. PWM. | 3.3 V logic. |
| 11 | 11 | Digital in and out. PWM. | 3.3 V logic. |
| 2 | 2 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 3 | 3 | Digital in and out. Analog in. PWM. | 3.3 V logic. |
| 5V | - | A 5 V power pin: 5V. | Not a GPIO. |
| GND | - | Ground. | - |
| GND | - | Ground. | - |
| TX | 16 | Digital in and out. PWM. | 3.3 V logic. Serial uses this pin. |
| RX | 17 | Digital in and out. PWM. | 3.3 V logic. Serial uses this pin. |
| 15 | 15 | Digital in and out. PWM. | 3.3 V logic. |
| 23 | 23 | Digital in and out. PWM. I2C SDA (default). | 3.3 V logic. |
| 22 | 22 | Digital in and out. PWM. I2C SCL (default). | 3.3 V logic. |
| 21 | 21 | Digital in and out. PWM. SPI SCK (default). | 3.3 V logic. |
| 20 | 20 | Digital in and out. PWM. SPI MISO (default). | 3.3 V logic. |
| 19 | 19 | Digital in and out. PWM. SPI MOSI (default). | 3.3 V logic. |
| 18 | 18 | Digital in and out. PWM. SPI SS (default). | 3.3 V logic. |
| 9 | 9 | Digital in and out. PWM. | 3.3 V logic. |
| GND | - | Ground. | - |
| 13 | 13 | Digital in and out. PWM. | 3.3 V logic. |
| 12 | 12 | Digital in and out. PWM. | 3.3 V logic. |
| GND | - | Ground. | - |
| 14 | 14 | Digital in and out. PWM. | 3.3 V logic. The real board has no GPIO 14 on its headers: this hole is only for projects saved with the early header setting. |
| _RF | - | The board's _RF pin. | Not a GPIO. |
How to read the table
The Pin column is what is printed on the board, and the silkscreen numbers are the GPIO numbers. The holes follow Espressif’s order for the board, with the antenna at the top: J1 down the left and J3 down the right. TX and RX are GPIO 16 and 17.
A hole that has no sketch name is a supply, a ground or a control pin. It is listed so the table matches the board, hole for hole.
Power and ground pins
The ESP32-C6 DevKitC has 4 ground holes in its pin list. Its 5 V pins are 5V. Its 3.3 V pins are 3V3. Pins named for a job, not for a GPIO, are RST and _RF. A sketch cannot drive any of these with digitalWrite.
PWM and analog pins
Every GPIO pad can drive PWM with analogWrite: every GPIO pad.
These pins can read an analog voltage with analogRead: 4, 5, 6, 0, 1, 2 and 3. The pins run at 3.3 V.
The default I2C and SPI pins
Wire uses SDA on 23 and SCL on 22.
SPI uses SCK on 21, MISO on 20, MOSI on 19 and SS on 18.
Which pin should I use for what?
For an LED, a buzzer or a switch, any GPIO row in the table will do. For dimming, pick a PWM pin: every GPIO pad. For a potentiometer or an analog sensor, use 4, 5, 6, 0, 1, 2 and 3. For an I2C module, wire SDA to 23 and SCL to 22. For an SPI module, wire SCK to 21, MISO to 20 and MOSI to 19, and use 18 for SS. The pins run at 3.3 V logic.
The pins
Down the left header: 3V3, RST, then GPIOs 4, 5, 6, 7, 0, 1, 8, 10, 11, 2, 3, then 5V and ground. Down the right: ground, TX, RX, then GPIOs 15, 23, 22, 21, 20, 19 and 18, then 9, ground, 13, 12 and ground. TX and RX are GPIO 16 and 17.
The logic level is 3.3 V. GPIO 24 and up are the SPI flash and are on neither header. A project saved before Mokxi drew the real order opens with an older header layout; set **header** to board to see the real one.
The RGB LED
GPIO 8 is the board's own WS2812, an addressable RGB LED. It wants twenty-four bits, not a simple level, so wire the **WS2812** part to GPIO 8 to get real colors.
The built-in **Rainbow** program does exactly that, bit-banging the pulse widths from a counted loop. The RMT peripheral that would normally drive such a LED is not modeled in this board.
PWM and analog
analogWrite(pin, 0..255) works on any GPIO. The output comes from LEDC, the chip's LED PWM controller, so there is no fixed set of ~ pins the way there is on an Uno. The default is eight bits at 1 kHz.
GPIO 0 to 6 are ADC1 channels 0 to 6. analogRead() on one of them gives a real twelve-bit conversion, 0 to 4095. Any other pin reads 0, and a pin with nothing on it also reads 0.
Bus defaults
Wire.begin() puts the I2C bus on GPIO 23 for SDA and GPIO 22 for SCL. You can move it with Wire.begin(sda, scl).
The default SPI pins are SCK on GPIO 21, MISO on GPIO 20, MOSI on GPIO 19 and SS on GPIO 18. The BOOT button on GPIO 9 is the board's one button, used by the built-in **Button** program.
Open this circuit in the editor. ESP32-C6: breathe an LED on GPIO 10, wired as it runs at the top of this page. Change a part or a value and run it again.
Open the circuitQuestions
What are the ESP32-C6 DevKitC I2C pins?
SDA is 23 and SCL is 22.
What are the ESP32-C6 DevKitC SPI pins?
SCK is 21, MISO is 20, MOSI is 19 and SS is 18.
Why won't analogRead work on pin 12?
Only GPIO `0` to `6` are ADC1 channels. `analogRead()` on any other pin returns `0`.
Which pin is the LED on?
The board has an addressable RGB LED on GPIO 8. Wire the **WS2812** part to that pin to control its colors.
Which pins can do pwm?
All of them. `analogWrite()` works on any GPIO because the output comes from the LEDC controller.
What are tx and rx on this board?
`TX` and `RX` are GPIO 16 and 17. The serial monitor uses UART0 through them.
Why is there no pin 14 on the board?
There is no GPIO 14 on either header. A wire to pin 14 is left out when you switch an old project to the real header order.
Build this for real
Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.