Let's Make Robots! | RobotShop

Reading and acting on hand held wireless controller input for motor control etc

Hi;

I have bought this Wireless Gamepad Controller which using some provided code on GitHub and following the guides have successfully used it to control a small robot chassis via a motor driver board from the CamJamEduKit#3 designed to be used with and fitted to a Raspberry Pi.

What I would like to do know is to use the same controller to control a larger robot that is fitted with a 2 x 32Amp Sabertooth Motor Driver Board. So far I have successfully connected this board to a Raspberry Pi and have been controlling the motors by sending plain text serial commands (that can be read by the driver board) over USB. The control interface up until now has been a web based control panel but the lag and error margin is terrible, hence the need to switch.

Cn anyone help me work out how to read the GameController Joystick / Buttons and convert these to send serial commands to the driver board in Python?

I have made some headway, details of which can be found here.

Many thanks.

 

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

To confirm, you want to somehow connect the receiver module directly to the Sabertooth without using the Pi? That won't be easy at all. You really should have the Pi as intermediate. If instead you meant you would like help deciphering the existing code to be of more use (i.e. one Python program to receive the commands from the joystick and operate the Sabertooth), that's an easier option. Neat project BTW.