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 Pin | GPIO / Name | Default / Primary Function | Alternate Mux Functions | PWM Channel |
|---|---|---|---|---|
| 1 | GP0 | UART0 TX | I2C0 SDA, SPI0 RX | 0A |
| 2 | GP1 | UART0 RX | I2C0 SCL, SPI0 CSn | 0B |
| 3 | GND | Ground | - | - |
| 4 | GP2 | I2C1 SDA | SPI0 SCK, UART0 CTS | 1A |
| 5 | GP3 | I2C1 SCL | SPI0 TX, UART0 RTS | 1B |
| 6 | GP4 | I2C0 SDA | SPI0 RX, UART1 TX | 2A |
| 7 | GP5 | I2C0 SCL | SPI0 CSn, UART1 RX | 2B |
| 8 | GND | Ground | - | - |
| 9 | GP6 | SPI0 SCK | I2C1 SDA, UART1 CTS | 3A |
| 10 | GP7 | SPI0 TX | I2C1 SCL, UART1 RTS | 3B |
| 11 | GP8 | SPI0 RX | I2C0 SDA, UART1 TX | 4A |
| 12 | GP9 | SPI0 CSn | I2C0 SCL, UART1 RX | 4B |
| 13 | GND | Ground | - | - |
| 14 | GP10 | SPI1 SCK | I2C1 SDA, UART1 CTS | 5A |
| 15 | GP11 | SPI1 TX | I2C1 SCL, UART1 RTS | 5B |
| 16 | GP12 | SPI1 RX | I2C0 SDA, UART0 TX | 6A |
| 17 | GP13 | SPI1 CSn | I2C0 SCL, UART0 RX | 6B |
| 18 | GND | Ground | - | - |
| 19 | GP14 | UART0 CTS | SPI1 SCK, I2C1 SDA | 7A |
| 20 | GP15 | UART0 RTS | SPI1 TX, I2C1 SCL | 7B |
| 21 | GP16 | SPI0 RX | I2C0 SDA, UART0 TX | 0A (Edge) |
| 22 | GP17 | SPI0 CSn | I2C0 SCL, UART0 RX | 0B (Edge) |
| 31 | GP26 | ADC0 / I2C1 SDA | SPI1 SCK, UART1 CTS | 5A |
| 32 | GP27 | ADC1 / I2C1 SCL | SPI1 TX, UART1 RTS | 5B |
| 34 | GP28 | ADC2 / I2C0 SDA | SPI1 RX, UART1 TX | 6A |
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.
| Feature | Pico (Original) | Pico W (Wireless) | Pico H (Headers) |
|---|---|---|---|
| GP23, GP24, GP25 | Available as standard GPIOs | Reserved internally for CYW43439 WiFi/BT chip SPI and control. Do not use. | Same as base Pico or W depending on sub-SKU |
| GP29 / ADC3 | Available on Physical Pin 35 | Routed internally to measure VSYS/3 via a voltage divider. Exposed only on the ADC_VREF test pad. | Pre-soldered male headers included |
| Onboard LED | Wired directly to GP25 | Wired to the WL_GPIO0 pin on the wireless chip, not GP25. | N/A |
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 pins | Why 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 / Motor | Do 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. |
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.
- 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.
- 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.
- 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...).
- 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.






