Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
You need a PID controller, or at least a PD controller, to get rid of the oscillations. I think there's a library somewhere in the Arduino website for a PID controller. Once you add it to your code, it's a matter of tuning the gains (KP, KD, etc) by way of experimentation, until you find values that drive your robot straight. http://en.wikipedia.org/wiki/PID_controller
BTW, this doesn't happen to be a robot for the IEEE competition, is it?
The excellent Arduino PID library can be found at: http://www.arduino.cc/playground/Code/PIDLibraryHave fun ...
Actually, it is, how did you know?