View Full Version : Joystick Output Values?
compwiz2008
17-01-2008, 21:09
I'm having issues programming our team's drive motors, and I am programming them on asumptions. :confused: I am assuming that the following is true:
joystick left on x-axis = value of 126 to 0
joystick right on x-axis = value of 128 to 255
joystick down on y-axis = 126 to 0
joystick up on y-axis = 128 to 255
Can someone confirm that my assumptions are true, or that their false? Thanks in advance.
Yes this is correct though i think you are referring to the y when you say up and down.
Steve_Alaniz
17-01-2008, 21:19
Please specify. Do you mean the joysticks that come in the kit or a different joystick? I have a non-kit game port joystick and a saitek joystick that runs through a chiclet. They are the reverse of each other.
The best way to find out is to use the dashboard viewer and look at the values in the OI screen.
good luck
Steve
compwiz2008
17-01-2008, 21:19
yeah.. oops. thinking error... I will edit my original post...
if you want just do a quick test
//This is assuming your controller is in port one of the OI
printf("p1_x= %d p1_y= %d \r",p1_x,p1_y);
compwiz2008
17-01-2008, 22:40
That is an excellent idea. I'm going to put the values onto the dashboardviewer, which will help with programming and also trimming the joystick.
To the post earlier: our team is using the standard kit joysticks.
Thanks for everyone's help! :)
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.