GPIO Support
Your NVIDIA IGX Orin™ Developer Kit has 16 general-purpose input/output (GPIO) pins. You can check the status, read, and set pins.
For information about pin out, contact your Original Design Manufacturer (ODM).
Use this documentation to perform the following tasks:
To work with your GPIO pins, first install the following gpiod software.
gpiod — https://www.acmesystems.it/gpiod. Install the software by running the following command:
sudo apt install gpiod
(Optional) gpiod python3 module and examples — https://pypi.org/project/gpiod/
Linux GPIO |
Pin |
Pin |
---|---|---|
Chip 2 Line 8 | 3 | 4 |
Chip 2 Line 9 | 5 | 6 |
Chip 2 Line 10 | 7 | 8 |
Chip 2 Line 11 | 9 | 10 |
Chip 2 Line 12 | 11 | 12 |
Chip 2 Line 13 | 13 | 14 |
Chip 2 Line 14 | 15 | 16 |
Chip 2 Line 15 | 17 | 18 |
In the examples that follow, gpiochip2
is the header.
To check pin status, run the following command:
sudo gpioinfo gpiochip2
The output should look similar to the following:
gpiochip2 - 16 lines:
line 0: unnamed unused input active-high
...
line 8: unnamed unused output active-high
...
To read a pin, use the command gpioget
. The following example gets pin 3:
sudo gpioget gpiochip2 8
The output should look similar to the following:
1
To set a pin, use the command gpioset
. The following example sets pin 5 to high:
sudo gpioset gpiochip2 9=1
The following example sets pin 5 to low:
sudo gpioset gpiochip2 9=0