Using Shaft Encoders
We have a pretty cool system worked out this year I think. We are using left and right motor drive and we have extreamly precise shaft encoders attached the each motor. I have written the code to control the motors depending on what each shaft encoder is reading. A calculation converts the joystick unsigned char into ticks per 26.2 millisecond loop and then the shaft encoders deciede whether the wheels are going slower or faster then the wanted ticks per loop coming from the joystick. If the joystick ticks and the actual shaft encoder ticks are not equal they are adjusted till they are. What this means is that we can achieve perfectly straight driving and perfect turns. This is also a huge advantage in autonomous mode because we can hand a sub routine a string of values telling the shaft encoders what the motors should be doing and the routine executes it flawlessly. It's much better working in distances than working in loop cycles. Hooray for this years robot control. 
__________________
.................................................. .........
Dylan Vester - (Programmer)
Running a P4 1.8 Ghz
Team 998, We can't win...
.................................................. .........
|