GPIO pinout: Raspberry Pi, Pico, ESP32 and Arduino Uno

Interactive GPIO pinout

5 V3.3 VGNDGPIOI2CSPIUARTADCCarefulControl
Tap a pin to see what it does.

This explorer maps the header pins on four common maker boards: the Raspberry Pi 40-pin header, the Raspberry Pi Pico, the ESP32 DevKitC V4 and the Arduino Uno R3. Tap a pin to see everything it can do, or search for a name like SDA or GPIO21. Colours mark power, ground, GPIO, I2C, SPI, UART and ADC pins. Use it as a wiring reference, and check voltage levels before you connect anything.

How to use it

  1. Pick the board you’re wiring.
  2. Tap a pin to see its details and all of its functions.
  3. Search when you know the signal you need but not where it is on the header.
  4. Use the colours to find groups at a glance. Many pins have more than one job, so tap a pin to see its full list instead of going by colour alone.
  5. When you wire, count physical pins from pin 1. Don’t count along a row of labels.

What the pin maps show, board by board

Each board has its own numbering scheme, and mixing them up is the most common wiring mistake. These are the facts that matter most.

Raspberry Pi 40-pin header

The header uses Broadcom (BCM) numbering in Python and C, but the physical pin numbers 1 to 40 are what you wire to. 26 pins work as GPIO. The rest are two 5V pins, two 3.3V pins and 8 ground pins. The grounds are physical pins 6, 9, 14, 20, 25, 30, 34 and 39. I2C1 is on GPIO2 and GPIO3, and the UART is on GPIO14 (TX) and GPIO15 (RX). SPI0 uses GPIO10 (MOSI), GPIO9 (MISO), GPIO11 (SCLK) and GPIO8 and GPIO7 for chip select. GPIO2 and GPIO3 are tied to 3.3V through 1.8kΩ resistors on the board. GPIO0 and GPIO1 (physical pins 27 and 28) are reserved for the HAT ID EEPROM and shouldn’t be used for general I2C.

Raspberry Pi Pico

According to the official datasheet, the Pico exposes 26 multi-function 3.3 V GPIO, of which 23 are digital-only and 3 can be used for ADC. GP23, GP24, GP25 and GP29 aren’t brought out to header pins at all. ADC0, ADC1 and ADC2 are on GP26, GP27 and GP28. The Pico has two SPI, two I2C and two UART interfaces, and each one can be routed to several different pin pairs. That’s why tapping a Pico pin usually shows a longer list of functions.

ESP32 DevKitC V4

The board brings most usable ESP32 signals out to two 19-pin headers. Some of those pins come with conditions. GPIO34, GPIO35, GPIO36 and GPIO39 are input-only. GPIO0, GPIO2, GPIO5, GPIO12 and GPIO15 are strapping pins, and GPIO6 to GPIO11 are reserved for flash. The ADC2 channels are managed by the Wi-Fi driver, so you can’t read them while Wi-Fi is active. The common default buses are I2C on GPIO21 (SDA) and GPIO22 (SCL), plus VSPI on GPIO5 (CS), 18 (SCK), 19 (MISO) and 23 (MOSI).

Arduino Uno R3

The Uno has 14 digital I/O pins (6 of them can output PWM) and 6 analog inputs. PWM is on pins 3, 5, 6, 9, 10 and 11. SPI uses 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK). Pins 0 and 1 carry the hardware serial port. The Uno uses 5V logic, unlike the other three boards, and its six analog inputs are 10-bit.

What the explorer does not do

It doesn’t check your circuit, shift logic levels or calculate current budgets. It can’t see how your software is set up, such as whether the Pi’s serial console is using GPIO14 and GPIO15. It also doesn’t cover other boards. The 30-pin ESP32 clones, the Uno R4 and the newer ESP32 chip families have different layouts. For those, use the manufacturer’s datasheet.

FAQ

Can I connect a 5V sensor straight to a Raspberry Pi or Pico GPIO pin?

No. The GPIO on both boards runs at 3.3V, and none of the Pi’s GPIO data pins are 5V tolerant. Put a level shifter or a voltage divider between the sensor’s output and the input pin.

Why does my code say GPIO17 when the wire is on pin 11?

Code uses BCM numbers, and the header uses physical positions. BCM GPIO17 is physical pin 11. When you tap a pin, the explorer shows both numbers, so you can read one off the other.

Which ESP32 DevKitC V4 pins should I avoid?

Never connect anything to GPIO6 to GPIO11, because they’re wired to the module’s flash. Be careful with the strapping pins, since the chip reads their levels at boot. For analog sensors on Wi-Fi projects, use the ADC1 pins (GPIO32 to GPIO39).

Where is I2C on the Arduino Uno R3?

The I2C (TWI) pins are SDA on A4 and SCL on A5, used through the Wire library. The R3 also has separate SDA and SCL pins near AREF, which carry the same two signals. If you use I2C, you can’t use A4 and A5 as analog inputs at the same time.

More maker tools