Pico: MicroPython GPIO
Start RP2040 development with MicroPython and a simple output loop.
◷ 25 minParts and tools
- Raspberry Pi Pico
- USB cable
- Thonny IDE
Lesson
Learning objective
Start RP2040 development with MicroPython and a simple output loop.
Procedure
- Review the circuit and confirm the board voltage.
- Build and inspect the wiring before applying power.
- Upload the example, observe the result and record your readings.
- Change one parameter, predict the result and test again.
Troubleshooting
Check power, ground, pin selection, polarity, compiler target and serial output. Use a multimeter or logic analyser where appropriate.
Example code
from machine import Pin
from time import sleep
led=Pin("LED",Pin.OUT)
while True:
led.toggle(); sleep(0.5)Knowledge check
Which language is used in this example?
