Setup Raspberry Pi Pico (2)
Hardware List
- A Raspberry Pi Pico 2 development board (Pico).
- A Raspberry Pi (5).
- A Micro-USB cable.
Install MicroPython Firmware
Note
Raspberry Pi Foundation has a very detailed and easy-to-follow guide allowing people to get started using Pico.
Fire up Thonny IDE on your Raspberry Pi then execute following steps.
- 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.28.0" as the "version".
- Click "Install" button to add MicroPython firmware to your Pico board.
Upload MicroPython Scripts
-
Install
rshellto MicroPython scripts. -
Upload action and perception modules.
-
Upload the main script.
ESC Calibration
In order to get Quicrun 1060 brushed ESC cooperating with Pico, a calibration needs to be done before the first time using it. Plug the ESC to a compatible battery pack, then execute the following steps.
- Switch off ESC.
- Unplug Pico from Raspberry Pi.
- Plug Pico back into Raspberry Pi.
- Turn ESC back on (you'll hear two shot beeps).
- Open up Thonny IDE, click the STOP button twice.
- Run calibration script in Thonny.
Troubleshooting: 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. - 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.
Now, you can repeat the steps in the previous section: Install MicroPython Firmware.