Xbox 360 controller

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?

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.

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.


//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

but remember to buffer the xbox controller, for this reason, im most likely gonna ditch the much-requested 360Drive on my team’s robot

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.

Lol that’d be so cool to do, but we don’t have enough time to figure that out.
I’m super jealous >.<

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