Setup Raspberry Pi Pico 2 (MicroPython)
Hardware List
- A Raspberry Pi Pico 2 development board (Pico).
- A Computer (Desktop/Laptop/RPi)
- A Micro-USB cable.
Install MicroPython Firmware
Raspberry Pi Foundation has a very detailed and easy-to-follow guide allowing people to get started using Pico.
-
Install Thonny on the computer. Open up a terminal and execute following command:
Tip
Go to thonny.org for installation guides on other OS.
-
Install
rshellif you prefer CLI for managing MicroPython scripts. -
(First time) Install MicroPython firmware from Thonny
- Click the bottom right corner of Thonny (where shows "Local Python 3"), then select "Install MicroPython"
- In the pop-out window, make sure the "Target volume" is automatically recognized and the "Target model" is set to "Raspberry Pi RP2350" or similar.
- Select "RP2" as the "MicroPython family", "Raspberry Pi Pico 2" as the "variant", "1.27.0" as the "version".
Click "Install" button to add MicroPython firmware to your Pico board.
Nuke Pico ("Factory Reset")
In case of the Pico gets frozen or is doing anything unexpected. You may want to nuke the Pico board (clear the Flash memory).
- Download the
flash_nuke.uf2file (If downloaded a.zipfile, unzip to extract the.uf2file.). - Hold the white button on the Pico board while plug the Pico into the computer until the Pico is recognized as a external storage device.
- Drag and drop (copy and paste) the
flash_nuke.uf2file to the external storage device.