Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Joystick Turns the Bot Inverted (http://www.chiefdelphi.com/forums/showthread.php?t=112231)

ohdan56 28-01-2013 10:24

Joystick Turns the Bot Inverted
 
Basically, when we move the stick left, the robot turns right and vice versa. Forward and reverse controls are setup as desired, but we cannot figure out why the turning is inverted or what part of the code needs to be changed to meet the preferences of our driver. Please advise, thanks!

vinnie 28-01-2013 10:32

Re: Joystick Turns the Bot Inverted
 
I assume you have something like
Code:

robotdrive.arcadeDrive(joystick.getX(), joystick.getY());
If you change it to
Code:

robotdrive.arcadeDrive(-joystick.getX(), joystick.getY());
and it should invert your turning

stingray27 28-01-2013 10:49

Re: Joystick Turns the Bot Inverted
 
Or, you do not have to mess with the code at all and flip the pwm wires on your digital sidecar for your drive motor controls (Ex. flip pwm 1 and 2 if 1 and 2 are your drive pwms)

Physicguy 28-01-2013 11:30

Re: Joystick Turns the Bot Inverted
 
Last year my team had the same problem and this was our solution given by our programming team lead... "let just flip the joystick"... i thought it was funny and i wanting to share.

Alan Anderson 28-01-2013 11:46

Re: Joystick Turns the Bot Inverted
 
Carefully inspect both your code and your wiring. Make sure that the left and right motors are the same ones in both the software and the hardware. It sounds like one of them has the sides swapped.


All times are GMT -5. The time now is 02:13.

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