|
Page 1 of 1
|
[ 5 posts ] |
|
| Author |
Message |
|
picaroon123
Rookie
Joined: Tue Jan 29, 2013 5:17 pm Posts: 5
|
 joystick troubles...
Hello all. I am currently trying to control motors with a joystick, but seem to be doing something wrong. I read the RobotC wiki guides, but I suppose I missed something! Here is the code:  |  |  |  | Code: #pragma config(Hubs, S1, HTMotor, none, none, none) #pragma config(Sensor, S1, , sensorI2CMuxController) #pragma config(Motor, mtr_S1_C1_1, motor1, tmotorTetrix, openLoop) #pragma config(Motor, mtr_S1_C1_2, motorE, tmotorTetrix, openLoop) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
#include "JoystickDriver.c"
task main() { while(true) { getJoystickSettings(joystick);
motor[motor1] = joystick.joy1_x2; }
}
|  |  |  |  |
Note that, when I simply said motor[motor1] = 100; everything worked as expected. ALSO, I have tried using multiple buttons, and none have worked.  Thanks to those who can help me out!
|
| Tue Feb 05, 2013 5:28 pm |
|
 |
|
JohnWatson
Site Admin
Joined: Thu May 24, 2012 12:15 pm Posts: 380
|
 Re: joystick troubles...
What appears on the Joystick Debugger window when you moves the joysticks? Do the values change accordingly, or do they not move? Does the joystick appear under the drop down menu, or is it stuck with a 'Joystick Not Found' message?
_________________Check out our Blog! And our Facebook page! Need help? Take a look at our Wiki and our Forums.I just met you, And this is crazy, But here's my code now, So fix it, maybe? ~ Carly Rae Jepsen parody
|
| Fri Feb 08, 2013 10:26 am |
|
 |
|
picaroon123
Rookie
Joined: Tue Jan 29, 2013 5:17 pm Posts: 5
|
 Re: joystick troubles...
Hello Mr Watson! When I move the joysticks, every corresponding button in both the Basic and FTC windows work fine :/ . And yeah, it appears as"Logitech Dual Action"
|
| Tue Mar 12, 2013 4:07 pm |
|
 |
|
JohnWatson
Site Admin
Joined: Thu May 24, 2012 12:15 pm Posts: 380
|
 Re: joystick troubles...
If the motor works with a direct assignment such as 'motor[motor1] = 100;' then the issue may be with the joystick drivers themselves. You may want to download the Logitech drivers manually from their site: http://www.logitech.com/en-us/support/g ... =14&bit=64Also, make sure the switch on the back of the joystick is set to 'D' and not 'X', and that the 'mode' light is turned off (it's the red LED above the left joystick, it can be toggled using the 'mode' button to the left of it).
_________________Check out our Blog! And our Facebook page! Need help? Take a look at our Wiki and our Forums.I just met you, And this is crazy, But here's my code now, So fix it, maybe? ~ Carly Rae Jepsen parody
|
| Fri Mar 15, 2013 6:30 pm |
|
 |
|
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1023
|
 Re: joystick troubles...
Hmm, my understand is that the game controllers are HID (Human Input Devices). HID compliant devices do not need drivers. Microsoft Windows has built-in drivers to handle standard HID devices. So I am not sure downloading Logitech drivers will help.
|
| Sun Apr 07, 2013 1:07 am |
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 5 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|