Displaying the pinout of a Raspberry Pi Pico is possible using my “picopins” script. The script displays the pinout in a colour coded format showing the location of power, ground and GPIO pins. I find it useful if I’m coding Pico projects on my laptop or Pi 400 and need to check the location of a GPIO pin.
The bash script runs from the Linux command line and I’ve tested it on Raspberry Pi OS and Ubuntu.
This can be a useful addition to other pinout resources such as the official Pi Pico diagram.
Download picopins Bash Script
The script can be downloaded directly to your Raspberry Pi or Linux device using:
wget https://raw.githubusercontent.com/RPiSpy/pi-pico/main/picopins.sh
Alternatively you could clone my Pi Pico repository to your preferred location using:
git clone https://github.com/RPiSpy/pi-pico.git
Once downloaded navigate to the correct directory and make the script executable:
chmod +x picopins.sh
You can then run the script using:
./picopins.sh
The output of picopins looks like this:
Copy Script to Bin Directory
Running the script is easy enough but it’s even easier if you copy it to the /bin directory. This would allow you to run “picopins” at any time and see the pinout output.
Copy the script using:
sudo cp picopins.sh /bin/picopins
Note that this changes the script name from “picopins.sh” to just “picopins”.
Now make sure it is executable:
sudo chmod +x /bin/picopins
Now you can run the command regardless of what directory you are currently in.
picopins
Other Pi Pico Resources
The latest version of the MicroPython firmware can be downloaded from:
Pi Pico: https://micropython.org/download/rp2-pico
Pi Pico W: https://micropython.org/download/rp2-pico-w
Free PDF download: Get Started with MicroPython on Raspberry Pi Pico