I had successfully completed my 2nd line follower with arduinohttp://www.youtube.com/watch?v=4ER1qnIqEkMhttp://www.youtube.com/watch?v=ZWAyEiVTTY8its not that good though but for beginner i believe its ok... but i face a problem... if u see the video closing you will see my robot sways and zigzags too much.... is there someway i can make it go straight and faster.... i used 4 sensors... i have currently reduced my speed becoz if i increase speed it zigzags even more violently. now i am completely overhauling this robot to make a new one any suggestions to avoid this problem in new robot?thanx in advance

It needs some kind of a look ahead so it knows how much it needs to turn to get to the target. The zigzag is caused by overshooting the target. Find a way to make it not overshoot, and you should remove most of the oscillation.

What are you using as your robot controller? You might find the PID line following section of the 3pi robot user's guide helpful. To really use PID well, you want to find a way to convert the sensor readings into a single "position" value that tells you where the line is. Ideally, the function you come up with will vary monotonically as the sensor array sweeps over the line. That is to say, as you sweep across the line, you want your position value to always increase as you move in one direction and always decrease as you move in the other. If the position value sometimes increases and sometimes decreases for the same sweep direction, the PID algorithm could result in instability problems.