How to switch the led or relay using jetson tx2 gpio pins?

I am unable to find any way of how to use jetson tx2 gpio pins, like i want switch it high & low inorder to switch the led or relay connected to that pin. So please someone help to sort this.

hello yashranka999,

please following below steps to enable GPIOs manually, taking control gpio220 for example.

cd /sys/class/gpio
echo 220 > export
cd gpio220
echo out > direction && echo 1 > value

there are more information for your reference.
devtalk topic: https://devtalk.nvidia.com/default/topic/1001584/jetson-tx2/gpio-pinmux/post/5226482/#5226482
Jetson TX2 Platform Adaptation and Bring-Up Guide: https://developer.nvidia.com/embedded/dlc/l4t-driver-package-tx2-adaptation-guide

Thanks for the info, but I need to know what pin on the J21 header is gpio220? Setting the gpio### is understood it’s the correlation of what pin gpio### this is mapped to is the bigger issue.

hello sherrick,

please check the mapping formula at step (5) from this comment:
[url]GPIO Pinmux - Jetson TX2 - NVIDIA Developer Forums

here’s TX2 pinmux spreadsheet,
[url]http://developer.nvidia.com/embedded/dlc/jetson-tx2-module-pinmux[/url]

there’s also some useful information about J21 pinout for your reference,
[url]http://www.jetsonhacks.com/nvidia-jetson-tx2-j21-header-pinout/[/url]

Thank you! That clears things up. I also emailed the folks at RidgeRun and they responded with a real good explanation as well.

I just noticed this info you mention is for the TX2 not the TX1

I am trying to drive a DC motor using the GPIO pins. I am currently trying to use a L298N controller board because I did some research online and it appeared to be a viable solution. However, when I connect up the motor, battery and the GPIO pins I cannot get the motor to move. I know the signals are getting to the GPIO pins. Is there anyone out there that has controlled a DC motor using the GPIO pins from a TX1 board?

Hi sherrick, did you check the electrical characters of the controller board to confirm if it matches that of TX2? Also did you probe the output signals of GPIOs to confirm they match the request of controller board?

The issue was that I needed to run a ground wire from the TX1 to the L298N board. Once I did that the GPIO signals from the TX1 triggered the activation of the DC motor