View Single Post
  #2   Spotlight this post!  
Unread 15-02-2010, 11:55
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Very basic programming issue

Here's my take:

Set your PWM cables such that you get the following behaviour:

Forward and Backwards are reversed
Left and Right are reversed

Hopefully when you do this, you'll notice that PWM 1 -> Left and PWM 2 -> Right, just as it should be based on what your code says.

Power down the robot, and on ALL your drivetrain speed controllers, switch the red and black wires that lead to the motors. That will reverse their direction.

Other here might recommend extensive coding changes to make this change in programming, but seeing as how you'd said your programming expertise is low, I think this is your best fix! Just make sure you document that you flipped these wires so that the next person who hooks up your motors knows to reverse them.
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
Reply With Quote