Skip to content

GPIO on Jetson Xavier #61

@imihassan

Description

@imihassan

Hi,
I want to use GPIO of Jetson Xavier AGX.

I followed all the procedures mentioned by you to run the GPIO pins but I am not able to run it. What can be the issue can you guide me? What am I missing or doing wrong? Any help will be appreciated.

The procedure I followed is as shown below:

1. Configure the GPIO expansion header for PWM or any other PIN, To configure run the following command.
sudo /opt/nvidia/jetson-io/jetson-io. and follow this link

2. Install GPIO Jetson using command
sudo pip3 install Jetson.GPIO
3. Copy new rules
sudo cp lib/python/Jetson/GPIO/99-gpio.rules /etc/udev/rules.d/
4. Run the following python code to toggle the voltage value. Check with a multimeter with GND and PWM (or whatever enabled) PINs

import Jetson.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
channel = 15

GPIO.setup(channel, GPIO.OUT)

while True:
   GPIO.output(channel, GPIO.HIGH)
   
   time.sleep(1)
   GPIO.output(channel, GPIO.LOW)

   time.sleep(1)

GPIO.cleanup()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions