Best sensors for detecting line?

G'day guys,

Im new to the whole arduino thing and in need of a bit of help. For a school project i have a nitro rc car that i want to control itself. I have an Arduino Mega and need help with choosing what sensor is best suited for trailing a solid black line and help programming it. All i need is the single servo i have to be controlled by the line. Any help or guidance would be much appreciated!

Cheers :)

Do some searches for "line follower", this is not a new concept.

How fast will your car be going?

Is the black line a requirement or can you use a white line. I ask because the contrast is normally greater for white to road than black to road.

Will do mate im just a bit confused as to what im looking at when it comes to programing this stuff! haha Not very fast for the demonstration.

Well either really, i suppose using a white line will be a better choice?

What you need is a light sensor, you calibrate it (take some readings on white, some on black) then turn the car back and forth a little to detect a line cross and stay near it, or if its a wider line then find the edge and get inside it, making small turns to get back when you cross the edge.

7th graders do this with Lego Mindstorm robots, is not that once you figure out your steering and get away from overcontrolling the turns.

I see and i asume i can me some sort of sensor bar using LDR's? I have made a lego mindstorms line follower before, but for this project i decided to step up to arduino for the first time. At the moment im looking for some code to work with, and figuring out how to set this thing up.

Use your lego code, break down what the code does and convert it to similar arduino language.

quick google search for arduino light sensor brings you here

http://www.arduino.cc/playground/Main/InterfacingWithHardware#light_sensor

scroll down some & do some reading to start.