# VOXL2 GPIO and Serial Interfaces

Source: https://forum.modalai.com/topic/1466/voxl2-gpio-and-serial-interfaces
Category: VOXL 2 and VOXL 2 Mini (https://forum.modalai.com/category/26/voxl-2-and-voxl-2-mini)
Tags: voxl-2
Posted: 2022-10-18 15:40:23 UTC by MGasper
Replies: 2 · Views: 744

## MGasper · 2022-10-18 15:40:23 UTC

Hi, I am currently using a VOXL2 and have been diving into the documentation and haven't been able to find or at least notice any reference to how to control GPIO pins and specifically UART pins through the DSP chip with my own program running on the VOXL2. I was wondering if I could be pointed to the appropriate documentation in order to set that up.

-Thanks

## Reply by Chad Sweet (ModalAI staff) · 2022-10-18 15:50:00 UTC

Sorry, it is poorly documented. The only I/O that needs to use the DSP is for flight controller development. The rest of the I/O is accessed through the Linux CPU and behaves like most Linux systems.

This page shows all of the connections https://docs.modalai.com/voxl2-connectors/

You can see references to things like /dev/ttyHS1 which is a UART available through Linux

You can find GPIO access in  /sys/class/gpio/gpio

## Reply by modaltb (ModalAI staff) · 2022-10-19 17:12:16 UTC

I've been meaning to get this into a user guide as well, but for the applications processor GPIO, here's an example of setting IO programmatically, in this case GPIOs 46/159:

https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-bind/-/blob/master/src/voxl-bind.c#L58

https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-bind/-/blob/master/src/voxl-bind.c#L147
