![]() |
Ps3/360 controller with robot programmed in Java
Hi all,
We're interested in knowing how our team could drive our robot using a Ps3 controller/Xbox 360 controller. We are programming our robot in Java. Can anyone help us out? Thanks. |
Re: Ps3/360 controller with robot programmed in Java
The driver station should see it as a Joystick. Install any drivers you would normally need (google for them), and then the controller should have its hats (the sticks) enumerated as axes and buttons numbered.
|
Re: Ps3/360 controller with robot programmed in Java
If you're having problems figuring out which axis/buttons on the controllers are which, go to Control Panel > Game Controllers.
Then, you select the game controller and click properties. Now, you can calibrate your device and see which axes is which number, and which button is which. Hint: Look at the documentation for the Joystick class for more information on how to read Joystick inputs. |
Re: Ps3/360 controller with robot programmed in Java
Quote:
I thought I had found the solution to my problem. I just need to find out what the "Point of View Hat" (The D-Pad) is according to the WPI Libraries. I know that Left-Right movement is read as Axis 6, but Up-Down movement is either not recognized by the Joystick class (being an axis higher than 6), or something else that I'm not thinking of. |
Re: Ps3/360 controller with robot programmed in Java
it only has six axes
|
Re: Ps3/360 controller with robot programmed in Java
Quote:
Left Analog Up/Down (Axis 2) Left Analog Left/Right (Axis 1) Right Analog Up/Down (Axis 5) Right Analog Left/Right (Axis 4) D-Pad Up/Down (Axis 7?) D-Pad Left/Right (Axis 6) Left/Right Triggers (yes, for some reason, these form their own set of axes, where pressing the left trigger outputs a positive value, and pressing the right trigger outputs a negative value) (Axis 3) |
Re: Ps3/360 controller with robot programmed in Java
If you would like to use a PS/3 controller you need a program called motionjoy to use its full funtionality. Our team is using a PS/3 controller with its 7 axis capibilities its very stable and easy to use.
Programmer Matt Gus Robotics, team228.org |
Re: Ps3/360 controller with robot programmed in Java
Quote:
Left Right joysticks would be 4 tilt foward back side side would be 2 and the variable triggers is 1 Programmer Matt, Gus Robotics, team228.org |
Re: Ps3/360 controller with robot programmed in Java
Quote:
Code:
public static int getDPad1( )Code:
if ( opControl.getRawAxis( ControllerConfig.getDPad1( ) ) >= 0.03 ) |
| All times are GMT -5. The time now is 08:18 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi