Quick start
Blink the LED on your EduRP2040 in under 5 minutes using MicroPython.
1. Flash MicroPython
- Connect the board to your PC while holding BOOTSEL.
- It will mount as a USB drive named
RPI-RP2. - Download the firmware from micropython.org/download/RPI_PICO and drop it into the drive.
- The board reboots ready to use.
2. Your first program
Connect via USB serial with Thonny and create main.py:
from machine import Pin
from time import sleep
led = Pin(25, Pin.OUT) # user LED on GPIO25
while True:
led.toggle()
sleep(0.5)
Hit Run and the LED blinks once per second.
3. Bonus: using PIO
import rp2
from machine import Pin
@rp2.asm_pio(set_init=rp2.PIO.OUT_LOW)
def blink():
set(pins, 1) [31]
set(pins, 0) [31]
sm = rp2.StateMachine(0, blink, freq=2000, set_base=Pin(25))
sm.active(1)
You just programmed a hardware state machine without touching the CPU.
Troubleshooting
RPI-RP2drive does not appear: check the USB-C cable (some are charge-only).- Thonny does not detect the port: in Tools → Options → Interpreter, choose MicroPython (Raspberry Pi Pico).