Jetson TX1 pilot Servos through GPIO

Dear all,

According to my test, I am using OpenCV to detect and track an object.
This tracking give me the centroid’s coordinates of the detected object.
I would like to use the coordinates of this object to pilot two servos (pan/tilt), to follow it with the webcam.

I saw that there is two pins on the 28 pins connector for the I2C (SDA and SCL) which I can use to pilot the servos, but I am not able to find how on the TX1.

Could you help me please ?

Thanks for your support and help.



Do you mean the gpio pins on devkit gpio expander? Do you know which pin you are going to use?

The easiest way to control gpio is through sysfs.

Hello WayneWWW,

Thank you for your reply.

Yes, I am talking about the GPIO expander slot on the Jetson Nvidia TX1, the J21 (Not 28 as I wrote)
According to your question, yes, I will use:

J21 - pin2 - +5V
J21 - pin6 - GND
J21 - pin27 - SDA (I2C)
J21 - pin28 - SCL (I2C)

So passing through sysfs, ok, it is like the Beaglebone Black.

My question was just to know if we can programming those pin through Nsight (C++), or directly on the Jetson.

Kind regards,


Please refer to this for pin info.

Also, sorry that I just notice you want to use I2C instead of GPIO pin, so the way to do programming is not sysfs but directly using i2c tools on jetson.

This is a usecase that installing lidar on tx1 with the same pins as yours. Though it is on older BSP, the programming method should be same.

Thank you WayneWWW,

Very useful, I appreciate.

All the best,