Re: Why my NXT robot keeps turning around?
It is usually related to tuning. For a typical algorithm where your code would do one of the three things: go straight when on threshold, go left when below threshold, go right when above threshold, your code may look something like this:
It is important to tune BASE_SPEED and SPEED_DIFF. If BASE_SPEED is too fast, you will lose the line on a curve. SPEED_DIFF determines how fast you react when losing the line. Regardless, the above algorithm will zigzag around the edge of the line, not following it very smoothly. You may want to try PID control as you have posted on the other thread.