I want to write a script that will read a joystick's hat switch and generate a pwm signal on the aux ports of the apm 2.5.  My question is how can I interface with a joystick using the python scripting feature?  Is the pygame library supported?

http://www.pygame.org/docs/ref/joystick.html

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer

    The current version of MP should support assigning the hatswitch/axis to a gimbal output channel.

  • I'm wondering if the pygame library is supported as well, I just can't seem to get mission planner to import pygame properly though. I keep receiving the error "Error running script cannot import base from pygame"

  • This is exactly what I am after as well but on the Pixhawk. Hopefully someone has the answer.

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…