ROBOTC.net forums
http://robotc.net/forums/

joystick troubles...
http://robotc.net/forums/viewtopic.php?f=1&t=5458
Page 1 of 1

Author:  picaroon123 [ Tue Feb 05, 2013 5:28 pm ]
Post subject:  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!

Author:  JohnWatson [ Fri Feb 08, 2013 10:26 am ]
Post subject:  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?

Author:  picaroon123 [ Tue Mar 12, 2013 4:07 pm ]
Post subject:  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"

Author:  JohnWatson [ Fri Mar 15, 2013 6:30 pm ]
Post subject:  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=64

Also, 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).

Author:  MHTS [ Sun Apr 07, 2013 1:07 am ]
Post subject:  Re: joystick troubles...

JohnWatson wrote:
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=64

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.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/