Getting started
Raspberry Pi Pico 2 W or 2 WH · Pico with MicroPython. Work through each stage; each one says how to tell it worked and what to try if it didn't.
What you need
-
USB cable Required
A micro-USB data cable to power and program it. A charge-only cable won't work.
Pico USB Patterned Fabric Cable - A/MicroB 1mIn stock · Ships Fri 4 Dec
$4.35 -
Headers Recommended
To plug it into a breadboard. This board comes without headers; solder these on.
$1.70 -
Breadboard Recommended
Build circuits without soldering.
840-Point BreadboardIn stock · Ships Fri 4 Dec
$6.20 -
Jumper wires Recommended
Connect LEDs, buttons and sensors.
40 Pin Jumper Wire — 15cm / M/MIn stock · Ships Fri 4 Dec
$5.10 -
Your Linux computer, with a free USB port
Step by step
-
Stage 1: Check you have everything
- Tick off each item below. The USB cable must carry data; many cables that come with phones and lights only charge.
-
Stage 2: Install Thonny on your Linux computer
- Download Thonny from thonny.org and install it.
-
Stage 3: Put MicroPython on the Pico
- Hold down the white BOOTSEL button on the Pico.
- Keep holding it while you plug the Pico into your Linux computer, then let go.
- A drive called RP2350 appears in your file manager.
- Download the MicroPython UF2 file for your exact board (Raspberry Pi Pico 2 W or 2 WH) from the MicroPython download page.
- Drag the UF2 file onto the RP2350 drive.
Before you start: Copying a UF2 file replaces whatever program is on the Pico. Use the file for your exact board; the Pico, Pico W, Pico 2 and Pico 2 W each have their own.Didn't work? The RP2350 drive doesn't appear
- Try another USB cable. A charge-only cable is the most common cause.
- Hold BOOTSEL the whole time you plug the cable in, and only let go afterwards.
- Try another USB port, directly on the computer rather than through a hub.
Didn't work? The drive disappeared but nothing else happened
- That's normal; the Pico has restarted with MicroPython. Carry on to connecting Thonny.
- If Thonny can't connect, check you used the UF2 for your exact board, then put the Pico in BOOTSEL mode and copy the right one.
-
Stage 4: Connect Thonny to the Pico
- In Thonny, click the interpreter name at the bottom right and choose MicroPython (Raspberry Pi Pico).
- If it asks for a port, pick the one that names the Pico.
Didn't work? Thonny can't connect
- Unplug the Pico, plug it back in (without BOOTSEL) and choose the interpreter again.
- Close any other program that may be using the Pico's port.
- In Thonny's interpreter menu, use "Install or update MicroPython" to put MicroPython on the board from Thonny itself.
- On Linux, if the port is refused, add your user to the dialout group and log in again.
-
Stage 5: Blink the LED
- Paste this into the editor and click Run:
from machine import Pin import time led = Pin("LED", Pin.OUT) while True: led.toggle() time.sleep(0.5)Click Stop to end it. To run it every time the Pico gets power, save it to the Pico as main.py.
Didn't work? The LED doesn't blink
- Check the shell for an error. A ValueError about "LED" means an old MicroPython; install the latest UF2 for your board.
- Check you clicked Run with the Pico, not your computer, selected as the interpreter.
Next steps
- Get Started with MicroPython on Raspberry Pi Pico
- Pico pinout and specifications
- Electronics kits for Pico
More help: Getting started with MicroPython on Raspberry Pi Pico · MicroPython for Raspberry Pi Pico 2 W or 2 WH
Steps checked against the official documentation on 22 October 2026.
Still stuck?
Tell us you have a Raspberry Pi Pico 2 W or 2 WH and which stage didn't work, and what you see. We'll help you get it going.