View Single Post
  #7   Spotlight this post!  
Unread 29-01-2010, 12:37
Darkknight512 Darkknight512 is offline
Programmer/Electronics
FRC #3375 (North Stars)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Canada
Posts: 26
Darkknight512 is on a distinguished road
Re: Inverted Turning

Quote:
Originally Posted by Alan Anderson View Post
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.

Last edited by Darkknight512 : 29-01-2010 at 13:33.
Reply With Quote