# GPIO via Python Script

Source: https://forum.modalai.com/topic/760/gpio-via-python-script
Category: Flight Core and Legacy VOXL (https://forum.modalai.com/category/9/flight-core-and-legacy-voxl)
Tags: flight-deck
Posted: 2022-02-21 17:04:25 UTC by Paolo Fermin
Replies: 1 · Views: 506

## Paolo Fermin · 2022-02-21 17:04:25 UTC

To whom it may concern,

I am attempting to use the VOXL flight deck to control VOXL GPIO pin 85, which is outputting to an Arduino Nano which will read the signal and perform an action. I am successfully able to toggle the pin using the voxl-gpio binary. However, I would like to trigger this pin from a Python script that is running on my base station. The base station is sending MAVLink offboard commands to my drone. I thought that I would be able to use Python os commands to simulate a command line input, but the problem is that my base station does not have access to the voxl-gpio service. It is possible to control the GPIO pin from a Python script?

## Reply by Chad Sweet (ModalAI staff) · 2022-02-22 04:44:39 UTC

Hi Paolo, we do not have the GPIO interface implemented in python. We do have the i2c interface implemented in python and you could use that as a basis for accessing the GPIO interface. Source code here: https://gitlab.com/voxl-public/core-libs/libvoxl_io/-/tree/master/lib/python
