Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   arcadeDrive, 3D Pro, pushing forward, goes backward (http://www.chiefdelphi.com/forums/showthread.php?t=134555)

rame 14-02-2015 04:31

arcadeDrive, 3D Pro, pushing forward, goes backward
 
Hi,

I am a newbie and this my first post. Sorry.

We are using this Java code without making any changes.

https://wpilib.screenstepslive.com/s...p-test-program
...
myRobot.arcadeDrive(stick);
....

We are using the Logitech 3D Pro from the KOP.

The robot moves. But pulling backwards on the joystick = robot moves forwards. Pushing the joystick forwards = robot moves backwards.

How can we reverse this?

Sorry I do not know how to post code and I do not want to paste the code here.

Thanks in advance for your help.

Rakusan2 14-02-2015 07:36

My suggestions is to take appart stick and use it as stick.getX () and stick.getY (). Also since you want to reverse forawd with backward, you can reverse the y value.
Therefore instead of myRobot.arcadeDrive (stick) put myRobot.arcadeDrive (-stick.getY(), stick.getX ())

GeeTwo 14-02-2015 09:13

Re: arcadeDrive, 3D Pro, pushing forward, goes backward
 
Check that you have the left and right motors connected to the correct ports as written into your code. Reversing left and right motors rotates the robot so that front is back and back is front.

rame 14-02-2015 16:47

Re: arcadeDrive, 3D Pro, pushing forward, goes backward
 
Quote:

Originally Posted by Rakusan2 (Post 1443854)
My suggestions is to take appart stick and use it as stick.getX () and stick.getY (). Also since you want to reverse forawd with backward, you can reverse the y value.
Therefore instead of myRobot.arcadeDrive (stick) put myRobot.arcadeDrive (-stick.getY(), stick.getX ())

Thanks, I will try this and report back. Much appreciated.

rame 14-02-2015 18:06

Re: arcadeDrive, 3D Pro, pushing forward, goes backward
 
Thanks! That worked!!! Reversing the x and y value did the trick. Thanks!


All times are GMT -5. The time now is 11:34.

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