RP2040 Pinout Explorer
Explore RP2040 and Raspberry Pi Pico GPIO pins, ADC channels, PWM slices, I2C, SPI, UART, PIO-capable pins and common board-specific warnings.
Board Summary
Board Notes
GPIO Pin Table
| Pin | Status | ADC | PWM | I2C | SPI | UART | PIO | Notes |
|---|
MicroPython GPIO Example
Arduino GPIO Example
RP2040 Pinout Tips
- GPIO: Most RP2040 GPIO pins are flexible and can be used for digital input or output.
- ADC: On Raspberry Pi Pico boards, GP26, GP27 and GP28 are commonly exposed as ADC0, ADC1 and ADC2.
- PWM: RP2040 GPIO pins can generally be used for PWM, but pins share PWM slices and channels.
- I2C: I2C0 and I2C1 can be mapped to several pins. GP4/GP5 and GP8/GP9 are common choices.
- SPI: SPI0 and SPI1 have several possible pin mappings. Always check your board wiring.
- UART: UART0 and UART1 can be mapped to common TX/RX pin pairs.
- PIO: One of the RP2040’s best features is Programmable I/O. Most GPIO pins can be driven by PIO state machines.
- Voltage: RP2040 GPIO is 3.3V logic. Do not connect 5V signals directly to GPIO pins.
How to Use the RP2040 Pinout Explorer
The RP2040 is one of the most flexible microcontrollers for hobby electronics, robotics, data logging and embedded projects. Instead of locking every function to one fixed pin, many features can be mapped across different GPIO pins. This gives you more freedom when designing a circuit, but it also means pin selection matters.
This tool helps you quickly check which pins are suitable for GPIO, ADC, PWM, I2C, SPI, UART and PIO-based projects before you start wiring components.
RP2040 GPIO Basics
Most RP2040 pins can be used as normal digital inputs or outputs. That means they can control LEDs, read buttons, drive transistor circuits, communicate with modules, or act as control lines for sensors and displays.
The important thing to remember is that RP2040 GPIO pins use 3.3V logic. They are not designed for direct connection to 5V signals. If you are using a 5V sensor, relay module or Arduino-compatible board, check whether level shifting is needed.
ADC Pins on Raspberry Pi Pico
The RP2040 includes analogue input support, but only certain pins are connected to ADC channels on common Pico-style boards.
Typical ADC pins are:
| Pin | ADC Channel | Common Use |
|---|---|---|
| GP26 | ADC0 | Potentiometers, sensors |
| GP27 | ADC1 | Analogue sensor input |
| GP28 | ADC2 | Battery or sensor readings |
| GP29 | ADC3 | Often used internally for voltage sensing |
Use ADC pins for analogue sensors such as light sensors, thermistors, potentiometers, soil moisture sensors and voltage dividers.
PWM on RP2040
PWM is useful for LED dimming, motor speed control, servo signals, buzzers and simple waveform generation.
Most RP2040 GPIO pins can output PWM, but pins share PWM slices and channels. This usually does not matter for simple projects, but it can matter if you need several independent PWM signals at different frequencies.
Good beginner uses for PWM include:
- fading LEDs
- controlling small motors through a driver
- generating tones with a buzzer
- controlling servo position
- adjusting fan speed
I2C Pin Selection
I2C is commonly used for displays and sensors. OLED screens, BME280 sensors, real-time clocks and many breakout boards use I2C.
Common Pico I2C choices include:
| I2C Bus | SDA | SCL |
|---|---|---|
| I2C0 | GP4 | GP5 |
| I2C0 | GP8 | GP9 |
| I2C1 | GP2 | GP3 |
| I2C1 | GP6 | GP7 |
When using multiple I2C devices, they can usually share the same SDA and SCL lines as long as each device has a unique address.
SPI Pin Selection
SPI is often used when speed matters. TFT displays, SD card modules, radio modules and some sensors use SPI.
Common RP2040 SPI uses include:
- colour displays
- SD card logging
- LoRa radio modules
- fast ADC or DAC chips
- shift registers
- LED matrix drivers
SPI normally needs clock, transmit, receive and chip select lines. Some devices only need a subset of these pins.
UART Pins
UART is useful for serial communication between boards and modules. GPS receivers, Bluetooth serial modules, RS485 adapters and other microcontrollers often use UART.
Typical use cases include:
- reading GPS data
- sending debug messages
- communicating with another Pico
- connecting to serial sensors
- using wireless serial modules
Always cross TX and RX when connecting two UART devices: TX on one device goes to RX on the other.
Why PIO Matters
Programmable I/O is one of the RP2040’s most powerful features. PIO lets the chip handle precise input and output timing without relying entirely on the main processor.
PIO can be useful for:
- custom communication protocols
- driving addressable LEDs
- reading unusual sensor signals
- generating precise waveforms
- high-speed parallel output
- timing-sensitive motor or display control
Beginners do not need PIO for simple GPIO projects, but it becomes very useful when a project needs timing that normal Python or Arduino code cannot reliably provide.
Common Pin Selection Mistakes
Avoid these common problems:
- connecting 5V signals directly to GPIO pins
- using ADC pins for digital output when analogue inputs are limited
- forgetting I2C pull-up resistors
- choosing conflicting SPI pins for multiple devices
- assuming every Pico-compatible board uses the same onboard LED pin
- ignoring pins already used by onboard sensors, LEDs or wireless modules
- using the same PWM slice when independent PWM timing is required
Good Beginner Pin Choices
For many simple Raspberry Pi Pico projects, these are practical starting points:
| Project Type | Suggested Pins |
|---|---|
| LED output | GP15 or GP16 |
| Button input | GP14 |
| I2C display | GP4 and GP5 |
| SPI display | GP18, GP19, GP16, GP17 |
| UART GPS | GP0 and GP1 |
| Analogue sensor | GP26 |
| PWM output | GP15 |
| PIO experiment | Any suitable free GPIO |
These are not the only valid choices, but they are easy to work with and commonly used in examples.
Final Tip
Before wiring a project, check the board model, confirm the pin function, and look for onboard conflicts. The RP2040 is very flexible, but the exact development board still matters. A pin that is free on a standard Pico may be connected to an LED, sensor, battery monitor or wireless module on another RP2040 board.