The RP2040 microcontroller at the heart of the Pico family offers immense flexibility, but that flexibility means almost every pin can be remapped. Before you solder headers or route a custom PCB, you need a definitive raspberry pi pico pinout diagram and a clear understanding of the hardware limits. Below is the complete reference, followed by the specific hardware traps that brick boards and corrupt sensor data.

The Complete Raspberry Pi Pico Pinout Diagram Reference

The standard Pico breaks out 26 multi-function GPIO pins (GP0 through GP28, minus GP23-GP25 which are routed internally on the W variant). The table below maps the physical board pins to their RP2040 GPIO numbers and default peripheral assignments.

Physical PinGPIO / NameDefault / Primary FunctionAlternate Mux FunctionsPWM Channel
1GP0UART0 TXI2C0 SDA, SPI0 RX0A
2GP1UART0 RXI2C0 SCL, SPI0 CSn0B
3GNDGround--
4GP2I2C1 SDASPI0 SCK, UART0 CTS1A
5GP3I2C1 SCLSPI0 TX, UART0 RTS1B
6GP4I2C0 SDASPI0 RX, UART1 TX2A
7GP5I2C0 SCLSPI0 CSn, UART1 RX2B
8GNDGround--
9GP6SPI0 SCKI2C1 SDA, UART1 CTS3A
10GP7SPI0 TXI2C1 SCL, UART1 RTS3B
11GP8SPI0 RXI2C0 SDA, UART1 TX4A
12GP9SPI0 CSnI2C0 SCL, UART1 RX4B
13GNDGround--
14GP10SPI1 SCKI2C1 SDA, UART1 CTS5A
15GP11SPI1 TXI2C1 SCL, UART1 RTS5B
16GP12SPI1 RXI2C0 SDA, UART0 TX6A
17GP13SPI1 CSnI2C0 SCL, UART0 RX6B
18GNDGround--
19GP14UART0 CTSSPI1 SCK, I2C1 SDA7A
20GP15UART0 RTSSPI1 TX, I2C1 SCL7B
21GP16SPI0 RXI2C0 SDA, UART0 TX0A (Edge)
22GP17SPI0 CSnI2C0 SCL, UART0 RX0B (Edge)
31GP26ADC0 / I2C1 SDASPI1 SCK, UART1 CTS5A
32GP27ADC1 / I2C1 SCLSPI1 TX, UART1 RTS5B
34GP28ADC2 / I2C0 SDASPI1 RX, UART1 TX6A

Board Variants: Pico vs. Pico W vs. Pico H

While the RP2040 silicon is identical across the lineup, the physical board routing changes depending on the SKU you buy. Treating a Pico W exactly like a standard Pico will result in bus contention and silent failures.

FeaturePico (Original)Pico W (Wireless)Pico H (Headers)
GP23, GP24, GP25Available as standard GPIOsReserved internally for CYW43439 WiFi/BT chip SPI and control. Do not use.Same as base Pico or W depending on sub-SKU
GP29 / ADC3Available on Physical Pin 35Routed internally to measure VSYS/3 via a voltage divider. Exposed only on the ADC_VREF test pad.Pre-soldered male headers included
Onboard LEDWired directly to GP25Wired to the WL_GPIO0 pin on the wireless chip, not GP25.N/A
Warning: If you are porting code from a standard Pico to a Pico W, any script that toggles GP25 to blink the onboard LED will fail silently. You must use the PWM or machine.Pin("LED", machine.Pin.OUT) abstraction in MicroPython, which automatically handles the wireless chip routing.

Rows People Get Wrong (And How to Fix Them)

The RP2040 Datasheet is dense, and a few specific pins on the bottom right of the board cause 90% of hardware debugging headaches.

ADC_VREF (Physical Pin 35)

What it means: This is the reference voltage for the Analog-to-Digital Converter. The RP2040 ADC measures input voltage as a ratio of this pin's voltage.
The Mistake: Leaving it floating or assuming the internal 3.3V rail is clean enough. The Pico's onboard switching regulator introduces high-frequency noise onto the 3.3V rail, causing ADC readings to jitter by 20-50mV.
The Fix: For precision sensor work (like load cells or thermistors), solder a 100nF ceramic capacitor and a 10µF tantalum capacitor directly across Pin 35 (ADC_VREF) and Pin 38 (AGND). For mission-critical accuracy, feed Pin 35 from a dedicated low-dropout (LDO) linear regulator.

VSYS (Pin 39) vs. VBUS (Pin 40)

What it means: Both can accept 1.8V to 5.5V to power the board, but they are separated by a Schottky diode.
The Mistake: Backpowering the board by feeding 5V into VSYS while the USB cable is plugged in. If your external 5V supply is slightly higher than the USB 5V (e.g., 5.1V vs 4.9V), current will flow backward through the Schottky diode into your PC's USB port, potentially tripping your motherboard's overcurrent protection or frying the USB controller.
The Fix: Always feed external 5V into VBUS (Pin 40) if the USB port might be connected. If you must use VSYS for a custom PCB, physically cut the VBUS trace on the Pico or use a USB cable with the red 5V wire snipped.

RUN (Pin 30)

What it means: Hardware reset pin tied to the RP2040's internal reset circuitry.
The Mistake: Driving this pin high with a 5V microcontroller. The RP2040 is strictly a 3.3V logic device. Feeding 5V into the RUN pin will destroy the internal ESD diode and permanently brick the chip.
The Fix: Only pull this pin to GND to reset. If interfacing with a 5V system, use an open-drain N-MOSFET or an optocoupler to pull it low.

Decision Path: Which Pin for Your Sensor or Power Source?

Use this decision tree to lock in your physical wiring before writing a single line of C++ or MicroPython. This prevents peripheral collisions where two libraries try to claim the same hardware block.

If you need to connect...Then use these exact pinsWhy this is the optimal pick
I2C Sensor (e.g., BME280, OLED)GP4 (SDA) and GP5 (SCL)Maps to I2C0. Keeps the right side of the board free for SPI. Requires 4.7kΩ pull-ups to 3.3V.
SPI Display (e.g., ST7789, ILI9341)GP16 (RX/MISO), GP17 (CS), GP18 (SCK), GP19 (TX/MOSI)Maps to SPI0. These pins are physically contiguous on the board, making ribbon cable routing clean.
Analog Sensor (e.g., Potentiometer, Mic)GP26 (ADC0), GP27 (ADC1), GP28 (ADC2)These are the only GPIOs routed to the RP2040's internal ADC block. Do not use PWM pins for analog reads.
High-Current Servo / MotorDo NOT use Pico 3V3(OUT)The onboard 3.3V regulator maxes out at ~300mA. Use a separate 5V/6V BEC (Battery Eliminator Circuit) and tie the grounds together.
Hardware UART (e.g., GPS Module)GP0 (TX) and GP1 (RX)Maps to UART0. Note: Pico TX connects to GPS RX, and Pico RX connects to GPS TX. Cross the lines.
Pro Tip: The RP2040's PIO (Programmable I/O) blocks can emulate almost any protocol. If you run out of standard I2C/SPI pins, you can use the official PIO libraries to bit-bang WS2812B addressable LEDs or secondary I2C buses on any arbitrary GPIO without blocking the main CPU cores.

Safe Interpretation When Silkscreen Markings Fade

After months on a workbench, exposure to flux residue, or aggressive rework, the white silkscreen text on the Pico can wear off. If you need to identify pins without the text, rely on the physical board geometry and copper layers.

  1. Orient the Board: Hold the board so the micro-USB (or USB-C on newer third-party clones) port is pointing up, away from you. The RP2040 chip should be in the center.
  2. Locate Pin 1: Look at the through-hole pads. Pin 1 (GP0, top-left) is the only pad on the left side that has a square copper ring on the bottom layer of the PCB. All other signal pads are perfectly round.
  3. Count the Grid: The Pico uses a strict 0.1-inch (2.54mm) pitch grid. Pin 1 is top-left, Pin 2 is top-right (VBUS). Pin 3 is GND (left side, second row down). The physical pins alternate down the left side (odd numbers: 1, 3, 5...) and down the right side (even numbers: 2, 4, 6...).
  4. Identify the Power Cluster: The bottom three pins on the right side are always the power cluster. From bottom to top, they are physically arranged as: VBUS (Pin 40), VSYS (Pin 39), and GND (Pin 38). The pin immediately to the left of VSYS is 3V3_EN (Pin 37).

By defaulting to GP4/GP5 for I2C and GP16-GP19 for SPI, you build muscle memory that survives faded boards and allows you to swap between standard Picos and Pico Ws without rewriting your pin-mapping dictionaries. Always verify your specific board variant's internal routing before applying power to GP23-GP25.