Topic-icon Using a USB joystick with MicroBasic

3 weeks 6 days ago - 3 weeks 6 days ago #29534924 by bartemat

I have 4 MDC2460 controllers that are connected in a CAN bus to control a robot. The master node has a laptop with Roborun plugged into it and the laptop has a USB joystick plugged in. I have several questions:

1) Is it possible to apply a deadband to a USB joystick? I am using getvalue(_CIS, 1) to access the joystick value that is applied to the motor and then I am applying that value to the other motors over CAN. However, Roborun utility applies that value before my Microbasic script does anything. Is there a better way to read the joystick value?
2) Is it possible to read the button presses on my joystick in Microbasic. The Roborun joystick utility recognizes them, but I don't know how to access those values in the script.
3) What does "Button out to C" do in the joystick configuration in Roborun?

Thanks for your time! I have poured over the documentation but I seem to be stuck. I have also attached the script that I have written.

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Go to top