![]() |
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!
|
Re: Joystick Turns the Bot Inverted
I assume you have something like
Code:
robotdrive.arcadeDrive(joystick.getX(), joystick.getY());Code:
robotdrive.arcadeDrive(-joystick.getX(), joystick.getY()); |
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)
|
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.
|
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