← MicroPython on Pi Pico and Projects
Project 1.2 & 1.3 Companion
Project 1.2 & 1.3 Checklist
Name: Period: Date:
Check off each box as you finish that step. The back is a quick reference for the commands, in case you don’t want to reopen the lesson pages.
Project 1.2: Flashing MicroPython
| Step | ✓ |
|---|---|
| Put my Pico into BOOTSEL mode and clicked Allow on the connect prompt | |
| Picked Install MicroPython from the interpreter menu | |
| Chose the right variant: Raspberry Pi Pico 2 W | |
| Bottom-right now shows MicroPython (Raspberry Pi Pico) connected |
Project 1.3: Files and the REPL
| Step | ✓ |
|---|---|
| Found both file panels: This computer and Raspberry Pi Pico | |
| Saved Hello World.py to Raspberry Pi Pico (not This computer) and ran it | |
Typed import machine and dir(machine) in the Shell | |
Printed machine.Pin.OUT and machine.Pin.IN | |
Created led for the onboard LED and turned it on, then off | |
Created myled for a wired LED (pin used: ) and turned it on, then off | |
Used .toggle() on myled | |
Used import time and time.sleep(5) | |
| Wrote blink.py, saved it to Raspberry Pi Pico, and got an LED blinking on its own |
Quick reference
Project 1.2: Flashing
- Hold BOOTSEL, plug in USB, count to three, let go.
- Interpreter menu (bottom-right) → Install MicroPython → Raspberry Pi Pico 2 W.
- Connected means the bottom-right shows MicroPython (Raspberry Pi Pico).
Project 1.3: Files and the REPL
- This computer is your Mac, Raspberry Pi Pico is the board. A file your LEDs depend on has to be on the Pico: File > Save As → Raspberry Pi Pico, not This computer.
REPL commands, in order:
import machine
dir(machine)
print(machine.Pin.OUT)
print(machine.Pin.IN)
led = machine.Pin("LED", machine.Pin.OUT)
myled = machine.Pin(13, 1)
led.value(1)
led.value(0)
myled.value(1)
myled.value(0)
myled.toggle()
import time
time.sleep(5)
blink.py skeleton, saved to Raspberry Pi Pico:
import machine
import time
# TODO: Define your led
# Blink something
while True:
# TODO: Turn your LED on and off with a delay between states