How to use the command 'pinout' (with examples)

How to use the command 'pinout' (with examples)

The command ‘pinout’ is a useful tool for Raspberry Pi users to view the pinout information and GPIO header diagram for their current Raspberry Pi. It provides a convenient way to visualize the GPIO pins and their functionalities on the terminal.

Use case 1: View the pinout information and GPIO header diagram

Code:

pinout

Motivation: The ‘pinout’ command allows users to quickly view the GPIO pin-out information and the corresponding diagram for their Raspberry Pi. This can be helpful for understanding the available pins and their functions, especially when working on projects that involve connecting external devices or sensors to the Raspberry Pi.

Explanation: The ‘pinout’ command is executed without any arguments. It fetches the pinout information and GPIO header diagram specific to the current Raspberry Pi model and displays it on the terminal. The ASCII diagram shows the GPIO pin numbers, their functions, and any special features associated with each pin.

Example output:

+-----+-----+---------+------+---+---Pi ZeroW+---+------+---------+-----+-----+
| BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
|     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
|   2 |   8 |   SDA.1 | ALT0 | 1 |  3 || 4  |   |      | 5V      |     |     |
|   3 |   9 |   SCL.1 | ALT0 | 1 |  5 || 6  |   |      | 0v      |     |     |
|   4 |   7 | GPIO. 7 |   IN | 1 |  7 || 8  | 0 |    IN | TxD     | 15  | 14  |
|     |     |      0v |      |   |  9 || 10 | 1 |    IN | RxD     | 16  | 15  |
|  17 |   0 | GPIO. 0 |   IN | 0 | 11 || 12 | 0 |    IN | GPIO. 1 | 1   | 18  |
|  27 |   2 | GPIO. 2 |   IN | 0 | 13 || 14 |   |      | 0V      |     |     |
|  22 |   3 | GPIO. 3 |   IN | 0 | 15 || 16 | 0 |    IN | GPIO. 4 | 4   | 23  |
|     |     |    3.3v |      |   | 17 || 18 | 0 |    IN | GPIO. 5 | 5   | 24  |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+

This example output shows a part of the pinout information and GPIO header diagram for a Raspberry Pi ZeroW. Each row represents a pin, and the columns provide details such as the Broadcom (BCM) number, WiringPi (wPi) number, pin name, mode, voltage, and physical pin number. This information can be used to identify the pins and their corresponding functions.

Use case 2: Open pinout.xyz in the default browser

Code:

pinout -x

Motivation: The ‘pinout’ command can also be used to quickly open the pinout.xyz website, which provides a graphical representation of the Raspberry Pi’s pinout information. Opening the website in the default browser allows users to access additional details and explore GPIO pin functionalities with ease.

Explanation: The ‘pinout -x’ command is used to open the pinout.xyz website in the default browser. The ‘-x’ argument instructs the command to execute the default action associated with the command, which in this case is opening the given URL. This is a convenient way to access the detailed and up-to-date information about the Raspberry Pi’s pins and their functionalities.

Example output: N/A (The default browser opens with the pinout.xyz website)

Upon executing the ‘pinout -x’ command, the default browser will open and display the pinout.xyz website. Users can then explore the website to access detailed information about the GPIO pins, their functions, supported voltages, pin modes, and more.

Conclusion:

The ‘pinout’ command is a handy tool for Raspberry Pi users to view the pinout information and GPIO header diagram on the terminal. It provides an ASCII diagram that makes it easy to understand the available pins and their functionalities. Additionally, the command allows users to quickly open the pinout.xyz website in their default browser, which provides a graphical representation of the Raspberry Pi’s pinout information. By using the ‘pinout’ command, users can gain a better understanding of the GPIO pins and their capabilities, enabling them to develop and troubleshoot projects more efficiently.

Related Posts

How to use the command 'nitrogen' (with examples)

How to use the command 'nitrogen' (with examples)

Nitrogen is a command-line tool that allows users to view and set desktop wallpapers on the X Window System.

Read More
Using pkgmk Command to Create Binary Packages (with examples)

Using pkgmk Command to Create Binary Packages (with examples)

Motivation Creating binary packages is an essential part of package management, especially when using CRUX.

Read More
How to use the command `conan frogarian` (with examples)

How to use the command `conan frogarian` (with examples)

The conan frogarian command is used to display the conan frogarian.

Read More