PINOUT(1)

πŸ“¦
version 2.0.1 Β· 3 versions
, in ubuntu noble, ubuntu questing

πŸ’– PINOUT(1) β€” the gpiozero pinout tool πŸ’–

okay bestie, listen β€” this is pinout(1), the gpiozero pinout tool. It's a utility for querying GPIO pin-out information. That's it, that's the whole vibe, and honestly? It's giving main character energy for anyone who's ever squinted at a Raspberry Pi header and gone "which one is ground again 😭".


✨ NAME ✨

pinout β€” GPIO Zero pinout tool

A utility for querying GPIO pin-out information. no cap, that's literally the job description 🫢


🌸 SYNOPSIS 🌸

pinout [-h] [-r REVISION] [-c] [-m] [-x]

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: pinout is a utility for querying Raspberry Pi GPIO pin-out information. Run pinout all by itself and it'll print you a board diagram and a GPIO header diagram for whatever Raspberry Pi you're currently on. Iconic. Showstopping. No arguments required.

But wait, there's more πŸ’… β€” you can also manually specify a revision of Pi, or (by Configuring Remote GPIO) output information about a remote Pi. Long-distance pinout info, we love a long-distance relationship πŸ’œ.


πŸ’… OPTIONS πŸ’…

  • -h, --help β€” shows a help message and then exits. Classic. Respectful. Slays.
  • -r REVISION, --revision REVISION β€” lets you specify a particular Raspberry Pi board revision code. The default behaviour is to autodetect the revision of the current device by reading /proc/cpuinfo πŸ•΅οΈβ€β™€οΈ (yes bestie, it's snooping, but consensually).
  • -c, --color β€” forces colored output. By default the output will include ANSI color codes if it's run in a color-capable terminal, but this option says "no, I want the pretty colors, I'm choosing the pretty colors". See also pinout --monochrome ✨🌈.
  • -m, --monochrome β€” forces monochrome output. Sometimes you just want plain text, and that's valid. See also pinout --color πŸ–€.
  • -x, --xyz β€” opens <https://pinout.xyz/> in your default web browser. Not me opening a whole website because I forgot what GPIO 14 does πŸ™ˆ.

πŸ“ EXAMPLES πŸ“

πŸ’– The classic: current Pi

To output information about the current Raspberry Pi:

$ pinout

For a Raspberry Pi model 3B, this will output something like the following:

Description        : Raspberry Pi 3B rev 1.2
Revision           : a02082
SoC                : BCM2837
RAM                : 1GB
Storage            : MicroSD
USB ports          : 4 (of which 0 USB3)
Ethernet ports     : 1 (100Mbps max. speed)
Wi-fi              : True
Bluetooth          : True
Camera ports (CSI) : 1
Display ports (DSI): 1

,--------------------------------.
| oooooooooooooooooooo J8     +====
| 1ooooooooooooooooooo        | USB
|                             +====
|      Pi Model 3B  V1.2         |
| |D      +---+               +====
| |S      |SoC|               | USB
| |I      +---+               +====
| |0               C|            |
|                  S|       +======
|                  I| |A|   |   Net
| pwr      |HDMI|  0| |u|   +======
`-| |------|    |-----|x|--------'

J8:
   3V3  (1) (2)  5V
 GPIO2  (3) (4)  5V
 GPIO3  (5) (6)  GND
 GPIO4  (7) (8)  GPIO14
   GND  (9) (10) GPIO15
GPIO17 (11) (12) GPIO18
GPIO27 (13) (14) GND
GPIO22 (15) (16) GPIO23
   3V3 (17) (18) GPIO24
GPIO10 (19) (20) GND
 GPIO9 (21) (22) GPIO25
GPIO11 (23) (24) GPIO8
   GND (25) (26) GPIO7
 GPIO0 (27) (28) GPIO1
 GPIO5 (29) (30) GND
 GPIO6 (31) (32) GPIO12
GPIO13 (33) (34) GND
GPIO19 (35) (36) GPIO16
GPIO26 (37) (38) GPIO20
   GND (39) (40) GPIO21

For further information, please refer to https://pinout.xyz/
lowkey the ASCII art is the moment, honestly. Look at that lil Pi. It's adorable. It ate. πŸ‘‘

πŸŽ€ Color control

By default, if stdout is a console that supports color, ANSI codes will be used to produce color output. But you can force it to be --monochrome:

$ pinout --monochrome

Or force it to be --color, in case you're redirecting to something capable of supporting ANSI codes:

$ pinout --color | less -SR

🧚 Manual revision, because autodetect isn't always the vibe

To manually specify the revision of Pi you want to query, use --revision. The tool understands both old-style revision codes <https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes> (such as for the model B):

$ pinout -r 000d

Or new-style revision codes <https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes> (such as for the Pi Zero W):

$ pinout -r 9000c1
[image]

🌈 Remote GPIO, aka pinning from a distance

You can also use the tool with Configuring Remote GPIO to query remote Raspberry Pi's:

$ GPIOZERO_PIN_FACTORY=pigpio PIGPIO_ADDR=other_pi pinout

Or run the tool directly on a PC using the mock pin implementation (although in this case you'll almost certainly want to specify the Pi revision manually):

$ GPIOZERO_PIN_FACTORY=mock pinout -r a22042
fr fr, the mock factory is so useful when your Pi is in another castle. 🏰

πŸ‘€ SEE ALSO πŸ‘€


🌟 AUTHOR 🌟

Ben Nuttall

2015-2024 Ben Nuttall


and that's the whole page bestie, we're done here. This was gpiozero version 2.0.1, dated Feb 15, 2024 β€” so yeah, it's the PINOUT(1) you know and love, just with better lighting and a cuter font. periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from