How use GPIO on Jetson Nano to trigger external actuators or LEDs when an object is detected?

I am actually currently working on a project i which I am doing real time custom object detection through live camera feed. But I want that once any object is detected like a stone is detected then an alarm must be raised or a buzzer should turn on from a GPIO pin of jetson nano. Then how can I do that?

hello farjadhaider3253,

you may have some implementation in your application to send specific events, and your sensor driver should receive external events and using APIs to trigger GPIO pins.
for example,

static inline void gpio_set_value(unsigned int gpio, int value)
 	__gpio_set_value(gpio, value);

Hello everyone! I want to say that I have a trained YOLOv4-416 custom model on one class and I have converted the yolo weights to tensorRT format with the help of @jkjung13. Special thanks to him and now I am able to do real time detection using a usb webcam at 4 FPS but now there is one last thing which remains that I want to raise an alarm from a GPIO pin of Jetson Nano once an object is detected. So how can I do that? the previous solution by @JerryChang do not helped me a lot. So kindly anybody who can help?

hello farjadhaider3253,

since the reference APIs to trigger GPIO pins not helpful, it seems you’d also initial another new discussion thread, Topic 149083.
let’s tracking this at your new discussion thread,

Ok !