Raspberry Pi Pico pinout
A small, low-cost board with the Raspberry Pi RP2040 chip. 3.3 V logic (not 5 V tolerant), breadboard friendly, and flashed by dragging a file onto it.
The real app with a simulated Raspberry Pi Pico, running in your browser. No install, nothing to plug in.
At a glance
- Chip
- RP2040
- Processor
- Dual-core Arm Cortex-M0+ at 133 MHz, 264 KB SRAM, 2 MB flash
- Logic level
- 3.3 V. Not 5 V tolerant unless marked below.
- Flashing tool
- picotool (UF2)
- Arduino board (FQBN)
- rp2040:rp2040:rpipico
- Live pin view in BoardPilot
- Yes (diagnostic agent available)
Pins to avoid or use with care
Debug port: SWCLK, SWDIO
SWD/JTAG. Using them can stop a debugger from reaching the chip.
Good pins for LEDs, buttons and signals
GP15, GP14, GP13, GP12, GP11, GP10, GP22, GP21, GP20, GP6, GP7, GP2, GP3
Default pins in Arduino
- I2C
- SDA = GP4, SCL = GP5. Only these pins work with the Wire library defaults. Only certain pin pairs can be I2C on this chip, and SDA and SCL cannot be swapped in software. Wire uses GP4 (SDA) and GP5 (SCL); Wire.setSDA()/Wire.setSCL() before Wire.begin() can move I2C0 to GP0/GP1, GP8/GP9, GP12/GP13, GP16/GP17 or GP20/GP21. Wire1 defaults to GP26/GP27.
- SPI
- MOSI = GP19, MISO = GP16, SCK = GP18, CS = GP17.
- Analog inputs
- GP26, GP27, GP28 (0–3.3 V)
How to flash it
If the board is not found, hold the BOOTSEL button while plugging in the USB cable.
All 43 pins
| Pin | GPIO | Chip pin | Functions | Notes |
|---|---|---|---|---|
| GP0 | 0 | GPIO, UART0_TX, SPI0_MISO, I2C0_SDA, PWM0_A, Serial1_TX | ||
| GP1 | 1 | GPIO, UART0_RX, SPI0_CS, I2C0_SCL, PWM0_B, Serial1_RX | ||
| GND | — | GND | ||
| GP2 | 2 | GPIO, UART0_CTS, SPI0_SCK, I2C1_SDA, PWM1_A | ||
| GP3 | 3 | GPIO, UART0_RTS, SPI0_MOSI, I2C1_SCL, PWM1_B | ||
| GP4 | 4 | GPIO, I2C_SDA (default), UART1_TX, SPI0_MISO, I2C0_SDA, PWM2_A | ||
| GP5 | 5 | GPIO, I2C_SCL (default), UART1_RX, SPI0_CS, I2C0_SCL, PWM2_B | ||
| GND | — | GND | ||
| GP6 | 6 | GPIO, UART1_CTS, SPI0_SCK, I2C1_SDA, PWM3_A | ||
| GP7 | 7 | GPIO, UART1_RTS, SPI0_MOSI, I2C1_SCL, PWM3_B | ||
| GP8 | 8 | GPIO, UART1_TX, SPI1_MISO, I2C0_SDA, PWM4_A, Serial2_TX | ||
| GP9 | 9 | GPIO, UART1_RX, SPI1_CS, I2C0_SCL, PWM4_B, Serial2_RX | ||
| GND | — | GND | ||
| GP10 | 10 | GPIO, UART1_CTS, SPI1_SCK, I2C1_SDA, PWM5_A | ||
| GP11 | 11 | GPIO, UART1_RTS, SPI1_MOSI, I2C1_SCL, PWM5_B | ||
| GP12 | 12 | GPIO, UART0_TX, SPI1_MISO, I2C0_SDA, PWM6_A | ||
| GP13 | 13 | GPIO, UART0_RX, SPI1_CS, I2C0_SCL, PWM6_B | ||
| GND | — | GND | ||
| GP14 | 14 | GPIO, UART0_CTS, SPI1_SCK, I2C1_SDA, PWM7_A | ||
| GP15 | 15 | GPIO, UART0_RTS, SPI1_MOSI, I2C1_SCL, PWM7_B | ||
| GP16 | 16 | GPIO, SPI_MISO (default), UART0_TX, SPI0_MISO, I2C0_SDA, PWM0_A | ||
| GP17 | 17 | GPIO, SPI_CS (default), UART0_RX, SPI0_CS, I2C0_SCL, PWM0_B | ||
| GND | — | GND | ||
| GP18 | 18 | GPIO, SPI_SCK (default), UART0_CTS, SPI0_SCK, I2C1_SDA, PWM1_A | ||
| GP19 | 19 | GPIO, SPI_MOSI (default), UART0_RTS, SPI0_MOSI, I2C1_SCL, PWM1_B | ||
| GP20 | 20 | GPIO, UART1_TX, SPI0_MISO, I2C0_SDA, PWM2_A | ||
| GP21 | 21 | GPIO, UART1_RX, SPI0_CS, I2C0_SCL, PWM2_B | ||
| GND | — | GND | ||
| GP22 | 22 | GPIO, UART1_CTS, SPI0_SCK, I2C1_SDA, PWM3_A | ||
| RUN | — | RESET | Reset pin. Connect it to GND for a moment to restart the board. It has an internal pull-up. | |
| GP26 | 26 | GPIO, ADC0, UART1_CTS, SPI1_SCK, I2C1_SDA, PWM5_A, Wire1_SDA | Analog input ADC0 (0 to 3.3 V). Never put more than 3.3 V on this pin. | |
| GP27 | 27 | GPIO, ADC1, UART1_RTS, SPI1_MOSI, I2C1_SCL, PWM5_B, Wire1_SCL | Analog input ADC1 (0 to 3.3 V). Never put more than 3.3 V on this pin. | |
| AGND | — | GND, ADC_GND | Analog ground for GP26 to GP28. Use it as the ground for analog sensors. | |
| GP28 | 28 | GPIO, ADC2, UART0_TX, SPI1_MISO, I2C0_SDA, PWM6_A | Analog input ADC2 (0 to 3.3 V). Never put more than 3.3 V on this pin. | |
| ADC_VREF | — | ADC_VREF | Reference voltage for the analog inputs (filtered 3.3 V). Do not power parts from it. | |
| 3V3(OUT) | — | 3V3_OUT | 3.3 V output for sensors and modules. Keep the load under 300 mA. | |
| 3V3_EN | — | 3V3_EN | Turns the 3.3 V supply on or off. Leave it unconnected; connecting it to GND switches the board off. | |
| GND | — | GND | ||
| VSYS | — | VSYS | Main power input (1.8 to 5.5 V). From USB it is about 4.7 V (5 V minus a diode drop). | |
| VBUS | — | VBUS | 5 V straight from the USB cable. It is 0 V when USB is not plugged in. | |
| SWCLK | — | SWD_CLK | Debug clock for a debug probe (SWD). Not a GPIO. | |
| GND | — | GND | Ground pin of the 3-pin debug header. | |
| SWDIO | — | SWD_IO | Debug data for a debug probe (SWD). Not a GPIO. |
Questions
Which pins are I2C on the Raspberry Pi Pico?
SDA is GP4 and SCL is GP5 (the defaults of the Arduino Wire library). Only certain pins support I2C in hardware, so use these unless you know your core allows others.
Which Raspberry Pi Pico pins should I avoid?
SWCLK, SWDIO (debug port).
Is the Raspberry Pi Pico 5 V tolerant?
No. The pins take at most 3.3 V. Use a level shifter or a voltage divider for 5 V signals.
Which pins can read analog voltage on the Raspberry Pi Pico?
GP26, GP27, GP28, from 0 to 3.3 V.
How do I upload code to the Raspberry Pi Pico?
In the Arduino IDE pick the board rp2040:rp2040:rpipico (core rp2040:rp2040). If the board is not found, hold the BOOTSEL button while plugging in the USB cable.
Wiring guides for the Raspberry Pi Pico
Step-by-step wiring, voltage checks and test code for the most used parts:
BME280 BMP280 DHT22 DHT11 HC-SR04 SSD1306 OLED MPU6050 DS18B20 WS2812B LED strip SG90 servo Relay module HC-SR501 PIR LCD 1602 I2C INA219 VL53L0X BH1750 MAX30102 RC522 RFID NEO-6M GPS Capacitive soil moisture sensor ADS1115 TM1637 28BYJ-48 stepper L298N Potentiometer Push button LED Joystick module SD card module AHT20
Compare
ESP32 DevKit vs Raspberry Pi Pico Raspberry Pi Pico vs Raspberry Pi Pico 2 Raspberry Pi Pico vs Raspberry Pi Pico W Raspberry Pi Pico vs Arduino Nano WeAct Black Pill STM32F411CE vs Raspberry Pi Pico
Learn the basics
Lesson: What is a microcontroller? Lesson: Hardware basics for software developers Lesson: GPIO: pins in and out Pinout GPIO Logic level (HIGH and LOW) UF2 Bootloader
Check your wiring with BoardPilot
BoardPilot shows this board in 3D, flags risky pins as you wire, and flashes it safely with a backup first.
Download BoardPilotSources
- Raspberry Pi Pico datasheet, 2. Mechanical specification, Figure 3 (51 x 21 x 1 mm, 17.78 mm row spacing, 48.26 mm pin span)
- Raspberry Pi Pico datasheet, 1. About, Figure 2 pinout; 2.1 Pinout (VBUS, VSYS, 3V3_EN, 3V3, ADC_VREF, AGND, RUN; GPIO23-25, 29 internal)
- Raspberry Pi Pico datasheet, 4.3 Using the ADC (GPIO26-29 diode to IOVDD, 3.3 V max); 4.4 Powerchain (VSYS = VBUS minus Schottky drop)
- RP2040 datasheet, 2.19.2 Function Select (UART/SPI/I2C/PWM per GPIO)
- earlephilhower/arduino-pico, variants/rpipico/pins_arduino.h (Wire, SPI, Serial1/2 pins) and boards.txt (board ids, USB ids)
- Raspberry Pi USB product ID list (raspberrypi/usb-pid), Internal PIDs 0x0003, 0x0005, 0x0009, 0x000A, 0x000F
- Board data file and source notes on GitHub