Back to Tools

ESP32, Arduino and Raspberry Pi Pinouts

Interactive pin diagrams for the ESP32 DevKitC, Arduino Uno and Nano, Raspberry Pi Pico and the Raspberry Pi 40-pin header, checked pin by pin against the official documents. Hover a pin to see what it can do and what to avoid.

Raspberry Pi Pico pinout (RP2040)

Raspberry Pi's RP2040 board: 26 usable GPIO on two rows of 20 pins, three of them ADC inputs. Almost every pin offers an I2C, SPI, UART and PWM function; pick one per pin in code. The pins marked default are the defaults in Raspberry Pi's official pinout.

Raspberry Pi PicoUSBRP2040DEBUG1GP02GP13GND4GP25GP36GP47GP58GND9GP610GP711GP812GP913GND14GP1015GP1116GP1217GP1318GND19GP1420GP1540VBUS39VSYS38GND373V3_EN363V3(OUT)35ADC_VREF34GP2833AGND32GP2731GP2630RUN29GP2228GND27GP2126GP2025GP1924GP1823GND22GP1721GP16

Top view, USB at the top. Pin 1 is top left; the numbers run down the left side and back up the right.

Key facts: Raspberry Pi Pico

Logic level
3.3 V. The absolute maximum on any GPIO is 3.3 V + 0.5 V, so 5 V signals need a level shifter.
Current per pin
Drive strength is set in software to 2, 4, 8 or 12 mA (4 mA by default).
Total current
50 mA sourced by all GPIO together, and 50 mA sunk.
Power
USB (VBUS, 5 V) or 1.8 to 5.5 V on VSYS. 3V3(OUT) can supply other parts; keep it under 300 mA.
On the board, not on the header
GP25 drives the LED, GP24 senses VBUS, GP23 sets the regulator's power-save mode and GP29 reads VSYS/3 on ADC3.
Pico 2
The Pico 2 uses the same 40-pin layout and power pins, but its RP2350 has different electrical limits. The numbers on this page are for the RP2040 Pico.

Pins to avoid or treat with care

  • Driving GP26–28 above 3.3 V or while the Pico is off: the ADC pins leak into the supply.
  • 3V3_EN and RUN as general pins: grounding either turns the Pico off or resets it.
  • Powering VSYS from a second supply while USB is plugged in, without a diode on that supply.

Raspberry Pi Pico pin table

43 of 43 pins
All pins of the Raspberry Pi Pico
PositionPinIn codeFunctionsNotes
Pin 1GP0I2C0 SDA, SPI0 RX, UART0 TX, PWM0 A
Pin 2GP1I2C0 SCL, SPI0 CSn, UART0 RX, PWM0 B
Pin 3––
Pin 4GP2I2C1 SDA, SPI0 SCK, UART0 CTS, PWM1 A
Pin 5GP3I2C1 SCL, SPI0 TX, UART0 RTS, PWM1 B
Pin 6GP4I2C0 SDA, SPI0 RX, UART1 TX, PWM2 A
Pin 7GP5I2C0 SCL, SPI0 CSn, UART1 RX, PWM2 B
Pin 8––
Pin 9GP6I2C1 SDA, SPI0 SCK, UART1 CTS, PWM3 A
Pin 10GP7I2C1 SCL, SPI0 TX, UART1 RTS, PWM3 B
Pin 11GP8I2C0 SDA, SPI1 RX, UART1 TX, PWM4 A
Pin 12GP9I2C0 SCL, SPI1 CSn, UART1 RX, PWM4 B
Pin 13––
Pin 14GP10I2C1 SDA, SPI1 SCK, UART1 CTS, PWM5 A
Pin 15GP11I2C1 SCL, SPI1 TX, UART1 RTS, PWM5 B
Pin 16GP12I2C0 SDA, SPI1 RX, UART0 TX, PWM6 A
Pin 17GP13I2C0 SCL, SPI1 CSn, UART0 RX, PWM6 B
Pin 18––
Pin 19GP14I2C1 SDA, SPI1 SCK, UART0 CTS, PWM7 A
Pin 20GP15I2C1 SCL, SPI1 TX, UART0 RTS, PWM7 B
Pin 21GP16I2C0 SDA, SPI0 RX, UART0 TX, PWM0 A
Pin 22GP17I2C0 SCL, SPI0 CSn, UART0 RX, PWM0 B
Pin 23––
Pin 24GP18I2C1 SDA, SPI0 SCK, UART0 CTS, PWM1 A
Pin 25GP19I2C1 SCL, SPI0 TX, UART0 RTS, PWM1 B
Pin 26GP20I2C0 SDA, SPI0 RX, UART1 TX, PWM2 ACLOCK GPIN0
Pin 27GP21I2C0 SCL, SPI0 CSn, UART1 RX, PWM2 BCLOCK GPOUT0
Pin 28––
Pin 29GP22I2C1 SDA, SPI0 SCK, UART1 CTS, PWM3 ACLOCK GPIN1
Pin 30––RP2040 enable with an on-chip pull-up of about 50 kΩ. Short it to ground to reset the Pico; a button from RUN to GND makes a reset button.
Pin 31GP26ADC0, I2C1 SDA, SPI1 SCK, UART1 CTS, PWM5 AADC pins have a diode to the 3.3 V rail: keep the input below 3.3 V + about 0.3 V, and don't drive them while the Pico is unpowered or the signal leaks into its supply.
Pin 32GP27ADC1, I2C1 SCL, SPI1 TX, UART1 RTS, PWM5 BADC pins have a diode to the 3.3 V rail: keep the input below 3.3 V + about 0.3 V, and don't drive them while the Pico is unpowered or the signal leaks into its supply.
Pin 33––Analog ground for GP26 to GP29, with its own ground plane under the ADC traces. Use it as the ground for analog sensors, or treat it as a normal GND if the ADC doesn't matter.
Pin 34GP28ADC2, I2C0 SDA, SPI1 RX, UART0 TX, PWM6 AADC pins have a diode to the 3.3 V rail: keep the input below 3.3 V + about 0.3 V, and don't drive them while the Pico is unpowered or the signal leaks into its supply.
Pin 35––The ADC's supply and reference, a filtered copy of 3.3 V. Connect an external reference here (for example a 3.0 V shunt reference) for better ADC accuracy.
Pin 36––The 3.3 V rail that powers the RP2040 and its I/O. You can power other parts from it; keep the load under 300 mA.
Pin 37––Enable for the 3.3 V regulator, pulled up to VSYS with 100 kΩ. Short it to ground to switch off the 3.3 V rail, which also powers down the RP2040.
Pin 38––
Pin 39––Main system input, 1.8 to 5.5 V, into the on-board buck-boost regulator. Power the Pico here from a battery or another supply; on USB it is VBUS minus the diode drop.
Pin 40––The Micro-USB 5 V input (5 V ± 10%), 0 V when no USB is connected. It feeds VSYS through a Schottky diode.
Debug––Serial Wire Debug clock, for a debug probe such as the Raspberry Pi Debug Probe.
Debug––
Debug––Serial Wire Debug data, for a debug probe such as the Raspberry Pi Debug Probe.

Sources for the Raspberry Pi Pico

How to read these pin diagrams

Every board is drawn from the top, the way you see it on the bench, with the pins in their real order. Red pins are power, black are ground, grey are control pins such as reset, and green are general-purpose I/O. A yellow ring marks a pin with a catch: a strapping pin that changes how the chip boots, a pin wired to flash or USB, or an input-only pin.

Pick a function above the drawing (I2C, SPI, ADC…) to light up the pins that can do it and see each pin's name for that function. Pins marked default are the ones the board's own documentation uses; on the ESP32 and the Pico most peripherals can move to other pins in software.

The label printed on the board, the physical pin number and the number you type in code are often three different things. On a Raspberry Pi, physical pin 11 is GPIO17. On an ESP32 the board says IO32 and the code says 32. The table under each drawing lists all three.

3.3 V or 5 V: logic levels and current limits

BoardLogic level5 V on a GPIO?Current per pinAll pins together
ESP32-DevKitC3.3 VNo (3.6 V max)~20 mA default, ~40 mA max drive1,200 mA (abs. max)
Arduino Uno R3, Nano5 VYes20 mA (40 mA abs. max)200 mA (abs. max)
Raspberry Pi Pico3.3 VNo2–12 mA, 4 mA default50 mA
Raspberry Pi (40-pin header)3.3 VNo16 mA50 mA

The ESP32, the Pico and the Raspberry Pi run their pins at 3.3 V and none of them is 5 V tolerant. A 5 V sensor output on one of their GPIOs needs a level shifter or a resistor divider. The Arduino Uno and Nano run at 5 V; most 3.3 V modules need their inputs shifted down when you connect them to an Arduino.

The current limits are for the I/O pins, not for driving motors or relays. A small indicator LED is fine on any of these boards with a series resistor that keeps it under the pin's limit; anything bigger goes through a transistor or a driver. The LED resistor calculator works out the resistor.

Questions people ask

Which ESP32 pins are safe to use?
On an ESP32-DevKitC with a WROOM module, GPIO4, 13, 14, 16–19, 21–23, 25–27, 32 and 33 are full input/output pins with no boot role. GPIO34–39 are fine as inputs. Leave GPIO6–11 alone (flash), keep GPIO1 and 3 for USB serial, and check what your circuit does to GPIO0, 2, 5, 12 and 15 at reset.
Why won't my ESP32 boot or upload?
Usually a strapping pin. GPIO0 pulled low at reset starts the bootloader instead of your program. GPIO12 pulled high switches the flash to 1.8 V. GPIO2 pulled high stops the board entering download mode. Move whatever is on those pins, or make sure it doesn't pull them the wrong way while the board resets.
Can I use ADC2 with Wi-Fi on?
No. The ESP32's Wi-Fi driver uses ADC2, so readings from ADC2 pins (GPIO0, 2, 4, 12–15, 25–27) fail while Wi-Fi is running. Use the ADC1 pins: GPIO32–36 and 39.
Is the ESP32-S3 or ESP32-C3 pinout the same?
No. The S3 and C3 are different chips with different GPIO numbers, ADC channels and strapping pins, and their dev boards have their own layouts. Don't use the ESP32 pinout above for them; use Espressif's guide for your exact board.
Which Arduino Uno pins are PWM?
Pins 3, 5, 6, 9, 10 and 11, marked with a ~ on the board. They run at about 490 Hz, except 5 and 6 at about 980 Hz. The same pins are PWM on the Nano.
Which pins are interrupts on an Uno or Nano?
attachInterrupt() works on pins 2 and 3 (INT0 and INT1). D0 to D13 and A0 to A5 also have pin-change interrupts (PCINT), which attachInterrupt() doesn't use.
What are A6 and A7 on the Nano?
Two extra analog inputs the Uno doesn't have. They are analog only: analogRead() works, but digitalRead(), digitalWrite() and pinMode() don't, and there is no pull-up.
Are Raspberry Pi GPIO pins 5 V tolerant?
No. Raspberry Pi GPIO pins are 3.3 V only, and 5 V on one can permanently damage the processor. The two 5V pins on the header are power pins, not signals.
Raspberry Pi: physical pin numbers or GPIO numbers?
Code uses the GPIO numbers (also called BCM numbers), such as GPIO17. The physical numbers 1 to 40 count across the header, odd pins on one row and even on the other, starting at the 3.3 V pin. GPIO17 is physical pin 11.
Does the Raspberry Pi Pico 2 have the same pinout?
The header layout and the power pins are the same. The chip is the RP2350 instead of the RP2040, with different electrical limits, so check the Pico 2 datasheet before relying on the numbers on this page.

Related tools and guides

Describe a circuit. Get a board you can order.

GrandpaCAD's chat picks real parts, draws the schematic, routes the PCB and checks it against JLCPCB's rules. You get Gerbers, BOM, pick-and-place, a KiCad project and a 3D board, plus a printed case if you want one.

"Raspberry Pi Pico carrier board with 8 buttons and a buzzer"

3 free generations, no card required