starting a simple DC motor

Hi, Im a beginner. I want help using the arduino to start a simple DC motor of a toy train. the motor should start under a certain condition and stop otherwise.

please help! thanks

Start under certain conditions?

Like when power is applied to the motor, or when there's a full moon, or when it's dark..........??

Most readers aren't into mind reading, so please supply as many details as possible.

eg

Arduino details motor details power supply details etc etc

Ken

if(condition) { start motor; } else{ stop motor; }

something like this..

May I ask what sort of conditions?

It may help readers to refine their answers.

Would also be helpful know which Arduino, which motor, which motor shield and how do you propose to power it all up?

Ken

You might want to take a look at Grumpy Mike's pages on the subject: http://www.thebox.myzen.co.uk/Workshop/Introduction.html