Raspberry Pi #
This page is about the Raspberry Pi Pico (W).
MicroPython #
Installation #
To install MicroPython on the Pico, go to https://www.raspberrypi.com/documentation/microcontrollers/, download the appropriate .uf2 file, connect the Pico to the computer while pushing the BOOTSEL button, release the button and copy the .uf2 file to the device.
To program in MicroPython, the common way is to use Thonny, an IDE which also handles the source code upload and running on the Pico. Another way is to use your usual editor to write the (Micro)Python source code and adafruit-ampy (TUI tool) to upload and run the programs on the device.
Another alternative is to use VSCode with the MicroPico extension.
C(++) #
Installation #
To program the Pico in C/C++, the common way is to use the arduino IDE. Once again there is a pure CLI way to do the same by using arduino-cli.
It seems that there is no Ubuntu(/Debian?) package for arduino-cli, and both snap version Nix version do not work properly, so you have to install it from the official web site (https://arduino.github.io/).
By default, the executable will be installed in the a bin subdirectory created frow where you launched the installation. To change this, you can launch something like: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh
.
To allow the installation of libraires from zip files and GtiHub repositories: arduino-cli config set library.enable_unsafe_install true
.