![]() |
how to program an xbox controller to drive a robot
can someone explain how to do this???
|
Re: how to program an xbox controller to drive a robot
An xbox game controller shows up in your code looking like any other joystick.
In your code you have to map the buttons and sticks to whatever you want them to do. For example, to setup a 2-stick tank drive you might use Axis 2 for the left drive and Axis 5 for the right drive. ![]() |
Re: how to program an xbox controller to drive a robot
Remember, though, You must have a wired controller (with the USB cable) for competition play, because any wireless communication* is forbidden.
*-Other than the robot router, of course |
Re: how to program an xbox controller to drive a robot
Quote:
Quote:
|
Re: how to program an xbox controller to drive a robot
What are you programming it in?
|
Re: how to program an xbox controller to drive a robot
thanks for the help i will let my team's programer know what you have posted so far
|
Re: how to program an xbox controller to drive a robot
We tried Xbox controllers and drivers preferred Logitech gamepads because the joysticks are symetrical.
|
Re: how to program an xbox controller to drive a robot
Quote:
|
Re: how to program an xbox controller to drive a robot
Quote:
|
Re: how to program an xbox controller to drive a robot
Quote:
|
Re: how to program an xbox controller to drive a robot
Quote:
Keep in mind the Driver Station uses direct input (not xinput). This may change for 2015 (fingers crossed). FYI: The left right trigger buttons acting as one is a side effect for Logitech F310 controller as well. |
Re: how to program an xbox controller to drive a robot
Quote:
Our biggest problem with them is that the controllers keep disappearing when we need them most! In fact, at the Razorback Regional last year, we realized that we had forgotten to bring one and had to run to Best Buy and get one. We bought a pink one, figuring few people would ever take it. Low and behold, it was gone by August. |
Re: how to program an xbox controller to drive a robot
Quote:
|
Re: how to program an xbox controller to drive a robot
We've used an Xbox controller since we began our team. It just shows up in Labview as another USB Joystick, all you have to do is make sure you have slescted the correct USB slot in Begin.vi and you can get values from there!
|
Re: how to program an xbox controller to drive a robot
If working in Java or C++, it can be helpful to write a utility class for the Xbox controller so you don't have to remember what button/axis number maps to each physical one. Here's what my team uses. Then you can just use it like any other joystick but with additional functionality.
|
Re: how to program an xbox controller to drive a robot
You can program them the same way you program any joystick, the buttons/axis will just not match up by default, you can do some experimenting to figure that out.
If you are using Java, I wrote a class for the Xbox Controller last year that is a drop in replacement for the standard joystick class when it comes to the CommandBased scheduling. XboxController.java |
Re: how to program an xbox controller to drive a robot
If you're working in LabVIEW, NI released a nifty program to show you where the axes and buttons are.
http://firstforge.wpi.edu/sf/frs/do/...r/frs1934?dl=1 |
Re: how to program an xbox controller to drive a robot
Quote:
|
| All times are GMT -5. The time now is 22:58. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi