View Single Post
  #8   Spotlight this post!  
Unread 31-01-2005, 18:01
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: Kevin's Navigation Script Working for Your Team?

Quote:
Originally Posted by chakorules
...the robot does not drive straight nor is it going the right direction, it's going backwards. We've changed the varibles:

/* Set these to change the motor direction,
1 = forward, -1 = backward. */
#define LEFT_DIR (-1)
#define RIGHT_DIR (1)

to

/* Set these to change the motor direction,
1 = forward, -1 = backward. */
#define LEFT_DIR (1)
#define RIGHT_DIR (-1)

But it still goes backwards and doesn't drive straight.

Just a guess:

If the motors are wired so that positive pwm values make both wheels turn the same direction, then I think the LEFT_DIR and RIGHT_DIR values need to be the same. By changing both of them, they are still different, and you haven't really changed anything. There are four combinations to try!
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.