This movie shows you how to get your robot following a grey road on a green field.
You may have your left and right motors connected differently to the way it is done in the movie. You also may have different readings on your sensors from the ones used in the movie, so there may be a few changes you have to make to get your robot following the road. But, still, this is pretty much how you do it.
This movie shows you how to write all the code needed to get your robot following a grey road on a green background.
This movie shows you how to write a function for road following:
This movie shows you how to combine road following with using a sonar to check what is in front of the robot.