I have been looking around to see why a simple python program like the LED blink does not produce an output. I saw few people in the forum with Jetpack 6.0 with same/similar issues and I can not find any single solution.
Below is the python program I am using.
import Jetson.GPIO as GPIO
import time
led_pin = 16
GPIO.setmode(GPIO.BOARD)
GPIO.setup(led_pin, GPIO.OUT, initial=GPIO.HIGH)
print(“Press CTRL+C when you want the LED to stop blinking”)
while True:
time.sleep(2)
GPIO.output(led_pin, GPIO.HIGH)
print(“LED is ON”)
time.sleep(2)
GPIO.output(led_pin, GPIO.LOW)
print(“LED is OFF”)
NOTE: I have Jetpack 6.1 already installed. I run cat /etc/nv_tegra_release and here is the result:
I see…but I still having trouble understanding how to patch. My technical knowledge is very limited. I am just trying to make a LED blink without using the patching process…I can not believe the AGX has to be patched to make it work out of the box. I am using below link to test drive the gpio functionality, It does not work for example on pin 16 on the board for example. What am I doing wrong here ?
please refer to developer guide, Kernel Customization for the steps to obtain kernel sources, and also the steps to build the code.
since it’s kernel update, you may update /boot/Image after re-building the kernel image, reboot the system to have changes take effect.
Not sure about your solution but thanks a lot for your help. I found the way to enable the pins using the following cli
$ sudo /opt/nvidia/jetson-io/jetson-io.py
NOTE: In my case I was trying to “see” the On/off of the gpio 12 from the examples folder (simple_out.py) with a voltmeter and that was not a good the way to actually see it works. Use an actual LED connected to the pin !!