How to get the clock into the program

I'm about to make a school project, in which I need to use the clock (Hour and minutes), to turn on a DC motor.

But how do I integrate the clock, so that I can make it run at a specified time.

And please make it detailed. I'm a noob ;D

Thx in advance!

A DC motor may not be the best choice for what you want to do, but can you tell some more about your expected motor speed and your gear ratios?

The DC motor has some gears attached, so the speed is actually not that important in the program. However it's gonna run very slowly. It's used to drive a belt with food, to feed fish in an aqaurium.

I'm sorry, I misread your post - I thought you were trying to make an analogue clock with a DC motor. You probably need to read-up on real-time clocks (RTC) to make sure the time is maintained even if the power to the Arduino is interrupted. After all, this is a life-support system you're designing!

ahh okay.. But it's a school project as i said, it's not that important to make it run after a power loss.. :) It's never gonna be used in real life ;)

have a look at the Time library in the playground. The download includes a TimeAlarms library that calls a function at a time you can specify.

http://www.arduino.cc/playground/Code/Time

ahh ! Excelent! Thanks you two ! :D