Without more information about what controller you're using for the robot, what the sensors are, or anything else about the robot, we can't really help any more than that.

billhowl:
Is it this advance line following robothttp://www.societyofrobots.com/member_tutorials/node/350Here is the source codehttp://www.societyofrobots.com/member_tutorials/files/Code%20V2.2(SOR)_0.zip