Quote:
Originally Posted by Alan Anderson
Don't just blindly start swapping things around. Look at how the program has the left and right motors defined, and make sure those are the motors actually being controlled by the relevant PWM outputs. You have to make the code consistent with physical reality.
Then, when you find that a motor is going in the direction opposite the way you think it should, change the "Invert" constant for that motor on the Drive Open vi.
(If you have wired the motors the way I think is most natural, the left motor should not be inverted and the right one should be. It's possible that your wiring is backwards from the way I expect, or perhaps your gearboxes are doing an extra reversal from the actual motor direction. It's not really important which one is which, only that the wheels go in the direction you want them to.)
|
How would I invert the motors in C++?
By my understanding shoulden't the robot invert its turning if I switch the PWM channels? It doesn't seem to make sense to me that the robot goes backwards when the PWM's are switched.