|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Hi I'm Joel Johnson from the HartlandElectroeagles team 3536, and i am having trouble with the the joystick controls. To go forward you have to tilt the joystick to the left, to go backwards right, ect... We are using the arcade drive code. I was wondering how to change it.
Thank You, Joel Johnson |
|
#2
|
||||
|
||||
|
Re: Weird Joystick controls
Flip the axises. The x axis is left and right the y axis is Forward backward. You probably are trying to use the x axis for forward backward and y as left right.
|
|
#3
|
||||
|
||||
|
Re: Weird Joystick controls
Ok il try that i think i may have flipped it i changed the axis input. we are a rookie team and i am a rookie coder so how would I change the X- axis to go left and right and the Y-axis to go forward and backward?
|
|
#4
|
||||
|
||||
|
Re: Weird Joystick controls
If you are using the arcade drive, on the left of the arcade drive box, there should be 3 possible wire inputs. The top (you know this already) is where your drive reference (pink) goes. The next two wires below that are your axis inputs. I believe top is x and bottom is y (if not, right click the arcade drive box and click help. This outlines each input in more detail). To switch them, you only need to place the x axis in the other slot and move the y axis into the now empty slot you just moved x from. I was once there, so good luck with the programming!
|
|
#5
|
|||||
|
|||||
|
Re: Weird Joystick controls
If you are using the unmodified Arcade Drive in the default project, there's nothing wrong with your joystick axes. What needs to be fixed is the direction your motors are turning. Specifically, your left motor is going the way opposite the way the code expects it to.
You can fix that either by switching the actual wires coming from the speed controller to the motor, or by changing the "LeftMotorInverted" constant on the 2 Motor Open from True to False in the Begin vi. |
|
#6
|
||||
|
||||
|
Re: Weird Joystick controls
Ok thanks alot guys il do that
|
|
#7
|
|||
|
|||
|
Re: Weird Joystick controls
where is the "LeftMotorInverted" constant setting? or the begin vi ?
Thank you -- OK I didn't realize this is for LabView -- How do you this if we are using C++ ? Last edited by Gmzcarlos : 12-02-2011 at 13:49. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|