GPIO and expansion
GPIO on Jetson Orin Nano and Orin NX. The 40-pin header, Jetson.GPIO and Jetson-IO.
For anyone wiring LEDs, buttons, sensors or HATs to a Jetson Orin Nano or Orin NX, especially coming from a Raspberry Pi. The steps and commands are NVIDIA's, and each one links to the NVIDIA page it comes from.
Checked against NVIDIA documentation on 28 November 2026
On this page
01The 40-pin header
The 40-pin header on a Jetson Orin.
The 40-pin header on a Jetson Orin Nano or Orin NX carrier board brings out GPIO and peripheral interfaces, in a layout similar to the Raspberry Pi's. NVIDIA's Jetson.GPIO library drives the pins from Python with the same API as RPi.GPIO, and NVIDIA's Jetson-IO tool sets what each pin does.
Many of the pins can work either as GPIO or as a special function such as I2C or I2S (NVIDIA's Jetson-IO guide). Which function a pin has is set in the device tree, so a pin that is not configured as GPIO will not behave as one, whatever your code says. That is the one big difference from a Raspberry Pi, and section 05 covers it.
- Python library
- Jetson.GPIO, same API as RPi.GPIO
- Pin functions
- Jetson-IO, applied at reboot
- Shell test
- gpiod: gpioinfo, gpioset, gpioget
- Voltage and limits
- In the carrier board's specification
02Install Jetson.GPIO
Install Jetson.GPIO and set permissions.
NVIDIA's Jetson.GPIO is a Python library that has the same API as the RPi.GPIO library for Raspberry Pi, so code written for a Pi needs few changes. It can even be imported under the name RPi.GPIO. Install it with pip (installation):
sudo pip install Jetson.GPIO
To use the pins without sudo, NVIDIA's README creates a gpio group, adds your user to it and installs its udev rules (setting user permissions). The rules file sits inside the installed package; the README gives its path for a pip install and for a source download.
sudo groupadd -f -r gpio
sudo usermod -a -G gpio your_user_name
# copy 99-gpio.rules from the installed package to /etc/udev/rules.d/, then:
sudo udevadm control --reload-rules && sudo udevadm trigger
Replace your_user_name with your login. NVIDIA says to reboot or reload the udev rules after copying them; log out and back in so the new group applies.
03Pin numbering
Pick a pin numbering mode.
Jetson.GPIO has four numbering modes, and setting one is mandatory (pin numbering):
| Mode | What the numbers mean | Source |
|---|---|---|
GPIO.BOARD | Physical pin numbers on the 40-pin header, as on a Raspberry Pi | Jetson.GPIO README |
GPIO.BCM | The Raspberry Pi's Broadcom numbering, for code written for a Pi | Jetson.GPIO README |
GPIO.CVM | Signal names, as strings, on the module's connector | Jetson.GPIO README |
GPIO.TEGRA_SOC | Signal names, as strings, on the Tegra SoC | Jetson.GPIO README |
BOARD is the easiest to check against the header, because the number is the pin you count to. BCM lets Raspberry Pi code run with its pin numbers unchanged.
04A first program
A first program: blink an LED.
This uses only the calls in NVIDIA's README: set the mode, set up a pin as an output, drive it high and low, then clean up so the pins go back to their default state (set up a channel, output, clean up). Pin 12 is the pin NVIDIA's own sample scripts use (BCM 18). Wire an LED with a series resistor between pin 12 and a ground pin.
import time
import Jetson.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(12, GPIO.OUT, initial=GPIO.LOW)
try:
for _ in range(10):
GPIO.output(12, GPIO.HIGH)
time.sleep(0.5)
GPIO.output(12, GPIO.LOW)
time.sleep(0.5)
finally:
GPIO.cleanup()
If the library warns that the pinmux for the pin is not configured as GPIO, that warning is the Orin-specific one in NVIDIA's README (warnings): set the pin up with Jetson-IO first.
05Pin functions with Jetson-IO
Set pin functions with Jetson-IO.
Jetson-IO is NVIDIA's tool for choosing what the 40-pin header's pins do. It changes the device tree so that the new configuration applies at the next reboot (Jetson-IO guide). NVIDIA lists the 40-pin header for the Jetson Orin NX and Orin Nano series. Start it with (running Jetson-IO):
sudo /opt/nvidia/jetson-io/jetson-io.py
- Choose the 40-pin header, then the functions to enable on it, such as SPI or I2S. Pins you do not assign can be left as GPIO or unused (configuring the header).
- Save. "Save and reboot to reconfigure pins" writes a new device tree, updates
/boot/extlinux/extlinux.confand reboots; "Save and exit without rebooting" applies it at your next reboot (saving). - To keep the change as a file, "Export as Device-Tree Overlay" stores an overlay in
/boot/(configuring the header).
For scripts, NVIDIA also ships command-line versions in the same folder: config-by-pin.py, config-by-function.py and config-by-hardware.py (command-line interface).
PWM needs the pinmux too
Jetson.GPIO supports PWM only on pins with a hardware PWM controller, and does not change the pinmux itself. NVIDIA's README says that if the pinmux is not configured, PWM signals will not reach the pins (PWM). Enable the PWM function in Jetson-IO before you use it.
06Testing from the shell
Testing pins from the shell with gpiod.
To check a pin without Python, NVIDIA's Jetson-IO guide uses the gpiod tools: gpioinfo lists the lines, gpiofind finds a line by its name, and gpioset and gpioget drive and read it (using the pins in GPIO mode). This is NVIDIA's example, which sets the line named PDD.02 high:
sudo apt install gpiod
gpioinfo
gpioset `gpiofind "PDD.02"`=1
Line names are SoC signal names, as in Jetson.GPIO's TEGRA_SOC mode. Which header pin a name reaches depends on the carrier board.
07Raspberry Pi HATs
Raspberry Pi HATs on a Jetson.
NVIDIA says the 40-pin header lets you connect a Jetson developer kit to off-the-shelf Raspberry Pi HATs, naming Seeed Grove modules and SparkFun Qwiic products (Jetson-IO guide). It does not promise that every HAT works. Before you fit one:
- Check the electrical side. NVIDIA's developer kit guide sends you to the carrier board specification for pin assignments, voltage levels and electrical limits (40-pin expansion header). Compare them with what the HAT expects.
- Check the software. A HAT whose Python code uses RPi.GPIO may run on Jetson.GPIO. One that needs a Raspberry Pi kernel driver or overlay will need a Jetson equivalent.
- Set the pin functions. A HAT that talks over SPI, I2C or I2S needs that function enabled in Jetson-IO first (section 05).
Coming from a Pi? Our Jetson Nano vs Raspberry Pi 5 guide covers what else carries over.
08On the CB302B
The 40-pin header on the CB302B.
The CB302B carrier board has a 40-pin header with UART, I2C, SPI and GPIO, in the same header format as the NVIDIA Jetson Orin Nano Developer Kit. It runs Linux for Tegra (L4T) with JetPack, and takes the Orin Nano 4GB, Orin Nano 8GB, Orin NX 8GB and Orin NX 16GB.
We have not tested Jetson.GPIO or any HAT on the CB302B yet, and we will publish its pin table on this page. Until then, tell us what you plan to connect and we will check it with you. Not every module part revision is confirmed yet, so include your module's part number.
- Header
- 40-pin, UART / I2C / SPI / GPIO
- Format
- Same header format as the Orin Nano Developer Kit
- Also on board
- 9-axis IMU, stereo speakers, microphone, two 22-pin camera connectors
- Software
- Linux for Tegra (L4T) with JetPack
As published on the CB302B page and datasheet
09Questions
Questions about GPIO on Jetson Orin.
Does RPi.GPIO code work on a Jetson Orin Nano?
Often, with Jetson.GPIO. NVIDIA's library has the same API as RPi.GPIO and can be imported under that name (Jetson.GPIO). The pins you use must also be configured as GPIO in the device tree (section 05).
Why does my GPIO pin not change on a Jetson Orin?
Usually because the pin is set to another function in the pinmux. NVIDIA's README has an Orin NX and Orin Nano warning for exactly this (warnings). Set the pin with Jetson-IO and reboot.
Does the Jetson Orin Nano have PWM on the 40-pin header?
Jetson.GPIO supports PWM on pins with a hardware PWM controller, once the pinmux connects the controller to the pin (PWM). Enable it in Jetson-IO first. The pins with PWM depend on the carrier board.
What voltage are the Jetson GPIO pins?
Check the carrier board's specification. NVIDIA's developer kit guide points there for voltage levels and electrical limits rather than stating them in the guide (40-pin expansion header).
10Sources
Sources.
Every step and command on this page comes from one of these NVIDIA pages, checked on 28 November 2026. CB302B details are as published on our product pages.
NVIDIA
- Jetson.GPIO (NVIDIA on GitHub)
The RPi.GPIO-compatible API, install, permissions, numbering modes, setup and output, Orin warning, PWM
- L4T r36.5: Configuring the Jetson expansion headers
Jetson-IO, pin functions, saving and reboot, overlays, command-line tools, Raspberry Pi HATs
- L4T r36.5: Using the pins in GPIO mode
The gpiod tools and NVIDIA's example
- Orin Nano Developer Kit hardware layout: 40-pin expansion header
Voltage levels and limits are in the carrier board specification
Next
Reserve a CB302B for your project.
The CB302B takes the Orin Nano or Orin NX module you have, with a 40-pin header, two camera connectors and genuine Milwaukee M12 battery power from packs you supply. We take reservations, not orders, and no payment is taken. Not every module part revision is confirmed yet, so send us your module's part number before you reserve.