Raspberry Pi Pico
Interactive Raspberry Pi Pico (RP2040) pinout with I2C, SPI, UART and ADC options, MicroPython and Arduino setup, and a compile-checked MicroPython blink.
Community draft — report a mistake
The Raspberry Pi Pico is a 3.3 V board built on Raspberry Pi’s own RP2040 chip: two Cortex-M0+ cores, 264 KB of RAM and the clever PIO blocks that can bit-bang protocols like WS2812 LEDs or VGA without the CPU.
It is the same footprint and header as the Pico W, minus the wireless chip — so it is cheaper, slightly simpler, and the on-board LED sits on GP25. Every pinout and wiring guide for the Pico W applies here, except anything that uses Wi-Fi.
Most makers start with MicroPython: drag a UF2 file onto the board and write Python in Thonny. The Arduino core by Earle Philhower is the other popular choice, and it is the one our compile checks use for C++ sketches.
Interactive pinout
Hover or tap a pin for its functions and traps. Filter to light up every I2C, ADC or boot pin.
- Safe for most uses
- Works, with a caveat
- Avoid unless you know why
- Power / control
3.3 V only. No pin is 5 V tolerant. Divide or level-shift 5 V signals before they reach a GPIO.
The LED is GP25 — but only on this Pico. Code written for the Pico W uses Pin("LED"). On the plain Pico use Pin(25). GP23, GP24 and GP29 are also used inside the board.
Pin functions are flexible. I2C, SPI and UART can move to several pin pairs — pick any pair the pinout marks for the same controller (for example I2C0 on GP4/GP5).
Set up your computer
- Install Arduino IDE 2.x from arduino.cc.
- File → Preferences → Additional boards manager URLs:
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json - Boards Manager → install Raspberry Pi Pico/RP2040 by Earle F. Philhower, III.
- Tools → Board → Raspberry Pi Pico, then pick the port that appears when you plug the board in.
Your platformio.ini:
[env:pico]
platform = raspberrypi
board = pico
framework = arduino[env:pico] platform = raspberrypi board = pico framework = arduino
- Download the firmware from micropython.org.
- Hold BOOTSEL while plugging in USB — a drive called RPI-RP2 appears.
- Drag the downloaded
.uf2file onto it; the board reboots into MicroPython. - Open Thonny → Interpreter → MicroPython (Raspberry Pi Pico).
First program
# First program for the Raspberry Pi Pico (no wireless): blink the on-board LED on GP25.
# (On a Pico W the LED is on the wireless chip instead — use Pin("LED") there.)
from machine import Pin
import time
led = Pin(25, Pin.OUT)
print("FlashReady: Pico blink")
while True:
led.toggle()
time.sleep(0.5)# First program for the Raspberry Pi Pico (no wireless): blink the on-board LED on GP25.
# (On a Pico W the LED is on the wireless chip instead — use Pin("LED") there.)
from machine import Pin
import time
led = Pin(25, Pin.OUT)
print("FlashReady: Pico blink")
while True:
led.toggle()
time.sleep(0.5)Components with Raspberry Pi Pico
- 74HC595 8-bit shift register (DIP-16) MicroPython
- A4988 stepper motor driver MicroPython
- HC-05 Bluetooth serial module MicroPython
- 16×2 character LCD (1602, parallel HD44780) MicroPython
- LM35 temperature sensor (TO-92) MicroPython
- MAX6675 K-type thermocouple module MicroPython
- MicroSD card module (SPI) MicroPython
- Nokia 5110 LCD (84×48, PCD8544) MicroPython
- TCRT5000 IR reflective sensor module MicroPython
- TP4056 Li-ion charger module (with DW01A protection) MicroPython
Common errors
RPI-RP2 drive does not appear
Hold BOOTSEL before plugging in, not after, and use a data cable. If it still does not show, try another USB port.
MicroPython: OSError: [Errno 5] EIO on I2C
The device is not answering: check SDA/SCL are on a matching I2C controller pair, the device has power, and the address. Run an I2C scan with i2c.scan().
Code for the Pico W fails with ValueError: invalid pin
Pin("LED") only exists on the Pico W. Use Pin(25) on the plain Pico.