Raspberry Pi Pico — First Steps with MicroPython
raspberry pipicomicropythonmicrocontroller
The Pico is a microcontroller (not a Linux computer). It runs MicroPython and is ideal for always-on sensor and automation projects.
Models
- Pico — $4, no wireless
- Pico W — $6, Wi-Fi + Bluetooth
- Pico 2 — newer RP2350 chip, more power
Install MicroPython
- Download .uf2 from micropython.org/download/rp2-pico
- Hold BOOTSEL button on Pico
- Connect via USB — Pico appears as USB drive
- Drag .uf2 onto drive
- Pico reboots into MicroPython
Thonny IDE
Download from thonny.org. Bottom-right: select MicroPython (Raspberry Pi Pico).
Blink the Built-in LED
from machine import Pin
import time
led = Pin("LED", Pin.OUT)
while True:
led.toggle()
time.sleep(0.5)
Read a Button
from machine import Pin
import time
button = Pin(14, Pin.IN, Pin.PULL_DOWN)
led = Pin(15, Pin.OUT)
while True:
led.value(button.value())
time.sleep(0.01)
Pico W — Connect to Wi-Fi
import network, time
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect("YourSSID", "YourPassword")
while not wlan.isconnected():
time.sleep(0.5)
print(f"Connected: {wlan.ifconfig()}")
Pico vs Full Raspberry Pi
- No Linux OS — just MicroPython
- No HDMI
- 3.3V GPIO (more tolerant than full Pi)
- Perfect for embedded sensor projects