Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Weird Joystick controls (http://www.chiefdelphi.com/forums/showthread.php?t=91283)

Joel Johnson 08-02-2011 18:40

Weird Joystick controls
 
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

kgzak 08-02-2011 19:49

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.

Joel Johnson 08-02-2011 20:42

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?

Egg 3141592654 08-02-2011 21:04

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!

Alan Anderson 08-02-2011 23:26

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.

Joel Johnson 09-02-2011 05:17

Re: Weird Joystick controls
 
Ok thanks alot guys il do that

Gmzcarlos 12-02-2011 13:23

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++ ?


All times are GMT -5. The time now is 09:14.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi