Hi! I have a jetson orin nano dev kit that I can’t get GPIO to work. I am using jetpack 6.1. (Tried reinstall a few times)
I need suggestions to how I can get it to work.
This time I followed this tutorial (GPIO Initial Setup):
# Update the system packages
sudo apt update
sudo apt upgrade
# Install Python development tools
sudo apt install python3-dev python3-pip
# Install Jetson.GPIO globally
sudo pip3 install Jetson.GPIO
# Add the current user to the GPIO group for non-root access
sudo groupadd -f gpio
sudo usermod -aG gpio $USER # $USER -> tor
sudo chmod 770 /dev/gpiochip*
# Log out and log back in to apply group changes
Then I checked with code under, which gave expected result:
python3 -c "import Jetson.GPIO as GPIO; print(GPIO.VERSION)"
I tested with the provided code, pin 12 did not work as expected. No blinking of led connected with a resistor. Multimeter did not show “blinking” either. Code was saved as a .py then got run in a terminal. Code was looping inside the “while True:” section until stopped with “ctrl+c”:
import Jetson.GPIO as GPIO
import time
# Pin Definitions
output_pin = 12 # BCM pin number
# Pin Setup
GPIO.setmode(GPIO.BCM) # BCM pin-numbering scheme
GPIO.setup(output_pin, GPIO.OUT, initial=GPIO.LOW)
print("Press CTRL+C to exit")
try:
while True:
GPIO.output(output_pin, GPIO.HIGH)
time.sleep(1)
GPIO.output(output_pin, GPIO.LOW)
time.sleep(1)
except KeyboardInterrupt:
print("Exiting program")
finally:
GPIO.cleanup()
Tested with some other pins to. Used this site to find pin overview (Pins view).
The led light does light up when connected to 3.3V pin to ground with a resistor.
Can I get some help to find out what is going wrong. Assume I am not the smartest as I can’t figure it out by reading the other posts about the same issue. Thanks :)