• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
ModalAI Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
    • Register
    • Login

    GPIO via Python Script

    VOXL Flight Deck
    2
    2
    142
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Paolo Fermin
      last edited by 21 Feb 2022, 17:04

      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?

      1 Reply Last reply Reply Quote 0
      • C
        Chad Sweet ModalAI Team
        last edited by 22 Feb 2022, 04:44

        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

        1 Reply Last reply Reply Quote 0
        1 out of 2
        • First post
          1/2
          Last post
        Powered by NodeBB | Contributors