Template Testing Python Script
We used the template testing python script as follows.
import Jetson.GPIO as GPIO
import time
# Set up the GPIO mode to BOARD (using physical pin numbering)
GPIO.setmode(GPIO.BOARD)
# Define the pin number
pin = 7
# Set up GPIO9 as an output
GPIO.setup(pin, GPIO.OUT, initial=GPIO.LOW)
try:
while True:
GPIO.output(pin, GPIO.HIGH)
print(f"GPIO PIN {pin} is on.")
time.sleep(0.5) # Wait for 500ms
GPIO.output(pin, GPIO.LOW)
print(f"GPIO PIN {pin} is off.")
time.sleep(0.5) # Wait for 500ms
except KeyboardInterrupt:
print("Exiting gracefully")
GPIO.cleanup() # Cleanup all GPIOs
Environment
- Jetpack 6.0 L4T 36.3.0 setup by SDK manager
- Jetpack 6.1 L4T 36.4.0 setup by SDK manager
Software Checking
We’ve checked the status of the GPIO by sudo gpioinfo | grep PAC.06
. The result is
line 144: "PAC.06" unused output active-high
When the template testing Python script shown above is running, the result of gpioinfo
is
line 144: "PAC.06" "Jetson-gpio" output active-high [used]
Also, we’ve checked the output of sudo cat /sys/kernel/debug/gpio | grep PAC.06
and the result is
gpio-492 (PAC.06 |Jetson-gpio ) out hi
gpio-492 (PAC.06 |Jetson-gpio ) out lo
...
and the output high and low voltage switch every 0.5 seconds, which matches the setting for the Python script.
Both the software-check methods are passed.
However, the result of the physical multimeter is still 0V.
Are there any possible problems I might not be aware of? Thanks.