GET an Output from GPIO pin in Jetson Nano

I have run Azure Custom vision model on Jetson Nano with Deep stream and I need to Get an Out put signal from GPIO when it detect “Rejected” labeled object detected by the camera. I was trying to fix this but i couldn’t able to find a way to do that and I really confused.

please provide me steps that i want to follow to setup this and if there is any sample codes/projects please provide me.

Thank you!

Hi shakthilakmal,

Are you using the devkit or custom board for Jetson Nano?
What’s your Jetpack version in use?

There should be several methods for this use case.
For example, you can create a service to monitor the “Rejected” and control GPIO through sysfs.
Or you can control GPIO through GitHub - NVIDIA/jetson-gpio: A Python library that enables the use of Jetson’s GPIOs and add them to your application.

1 Like

I am using Jetson nano Dev kit(4GB)]
Can you explain each steps that i want to follow create a service to monitor the “Rejected” and control GPIO through sysfs. including example codes.

Thank you!

Sorry that it seems the custom requirement specific to your use case. There should be many resources online about how to create custom system service and also the commands to control GPIO. You have to study that and implement by yourself.

I can just give you a simple example to control GPIO through sysfs, you can try it on your board first.

$ cd /sys/class/gpio
# echo 194 > export
# cd gpio194
# echo out > direction && echo 1 > value
1 Like

Thank you very much!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.