|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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 ()) |
|
#3
|
|||||
|
|||||
|
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.
|
|
#4
|
|||
|
|||
|
Re: arcadeDrive, 3D Pro, pushing forward, goes backward
Quote:
|
|
#5
|
|||
|
|||
|
Re: arcadeDrive, 3D Pro, pushing forward, goes backward
Thanks! That worked!!! Reversing the x and y value did the trick. Thanks!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|