GPIO via Python Script
-
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?
-
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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login