I have been to http://www.chiefdelphi.com/forums//t/parking-scenario-clarification-requested/47988/1&highlight=joystick but the left motors goes back and the right goes forward. We are using a Y-cable(one for left one for right). we tried switching the cables around on the relays but it was the same. We have tried many variations of the code but still cant get it to work. Any ideas how we can fix the problem?
You do not need to change your code. Lets say you push the joystick forward and your left motors turn the opposite direction from your motors on the right side of your robot. If you swap the two wires that connect to the OUTPUT of a Victor that is connected to a motor on the left side, that motor will now rotate in a direction opposite from the direction it rotated before you swapped the wiring. Thus, after swapping the 2 wires on the OUTPUT of all the Victors that control the left motors, the left motors should now rotate in the same direction as the motors on the right side of your robot.