When it comes to the Raspberry Pi, building your Pi project starts with a game plan and designing your plan starts with knowing exactly which GPIO pin does what. That’s where tools like our GPIO pinout article or the those offered by Pinout.xyz come into play.
Run by Pimoroni Developer Phil Howard, Pinout.xyz (opens in new tab) houses all sorts of useful GPIO charts and interactive tools for makers to reference while building their projects. Not only do they have every Raspberry Pi GPIO you can think of, but they also have quite a few pinout charts for Raspberry Pi accessories like HATs, boards, and pHATs.
As April draws to a close, Howard surprised us with a new command line tool that allows you to see the pinout for Raspberry Pi Pico right in your terminal and to query it for specific information. The Python 3-powered application called Picopins can run in the Linux or Windows command lines. You just need to have Python 3 installed.
To install Picopins, use the pip package installer, which comes with most installations of Python 3 or can be install separately.
pip install picopins
If pip alone does not work, try pip3.
When you enter the command picopins, the application loads a lovely chart displaying the Raspberry Pi Pico and its pins. By default, all you see are the basics for each pin: GP number, ground, voltage and ADC.
However, if you enter picopins –all, you get a very detailed listing of what each pin does, including whether it supports I2C, SPA or UART connections.
But that amount of information can be overwhelming. If you just want to find the pins that have a particular function, you can use the –find argument followed by what you’re looking for. For example, if you want to highlight the ground pins, enter picopins –find ground and you’ll get a result like this.
Unfortunately, the –find feature isn’t perfect. When we entered picopins –find uart, it did not highlight pins that have uart capability. The same happened when we tried it with i2c or spa.
If you want to see a complete list of all the command line arguments for picopins, enter picopins –help. To learn even more about this new tool and track its development, head over the official Picopins project page at GitHub. There you can not only see the official source code but find official usage instructions from Howard himself.