Log in

View Full Version : Xbox 360 controller


viper110110
16-02-2010, 17:10
We have an xbox controller connected to the ds and it works fine for the left stick and most of the buttons. How do we get the x and y values for the right stick?

seventhapollo
16-02-2010, 17:17
What platform are you using (C++, Java, or LV)?

One thing to ensure is that in Game Controllers (from the Control Panel) you can see your x and y axes moving with the stick. Then it's simply a code issue.

viper110110
16-02-2010, 17:28
We are using java

I'm pretty sure the right stick works as I have used it at home for games. I will try what you said and see.

EHaskins
16-02-2010, 19:21
//definitions
Joystick stick = new Joystick(1);

//usage
float axis = stick.getRawAxis(axisNumber); //see table below for axis numbers
boolean button = stick.getRawButton(buttonNumber);

Axis indexes:
1 - LeftX
2 - LeftY
3 - Triggers (Each trigger = 0 to 1, axis value = right - left)
4 - RightX
5 - RightY
6 - DPad Left/Right

Button mapping matches Windows Control Panel>Game Pads display

Robototes2412
16-02-2010, 21:50
but remember to buffer the xbox controller, for this reason, im most likely gonna ditch the much-requested 360Drive on my team's robot

apalrd
16-02-2010, 22:00
the Logitech ps2-like controller works very well. I would recommend it to anyone having problems with the 360 controller. We are driving with one, the same one that drove us in 2008 and its still running without issue at all.

[TBT] Vampire
18-02-2010, 19:42
Lol that'd be so cool to do, but we don't have enough time to figure that out.
I'm super jealous >.<

EHaskins
18-02-2010, 19:58
the Logitech ps2-like controller works very well. I would recommend it to anyone having problems with the 360 controller. We are driving with one, the same one that drove us in 2008 and its still running without issue at all.

That one is also less than half the price of a 360 controller. I've had good luck with that one as well.