Hi All, just wanting to know how to build a clock with timer built in?
what I want to do is have the arduino running a real time clock and have specific times to turn on and off a load, this is a basic program I know but I am a uber noob and have no idea what to do, my arduino is still in the mail!
thanks
Some clock ICs can signal an alarm by themselves. So you could send your Arduino to sleep and have it wake up by an interrupt triggered by the clock IC.
Well, if power consumption is not your concern, just get the time from the clock IC, compare it to the alarm time, delay(1000), and start from the beginning.
Of course, you can do this without additional hardware (like the clock IC) - the search-function will help.
To give you an idea of what I want to do here is a example of what I would do when programming the pascal automation controller which connects to the CBus network :
{ Lighting control timer and clock }
once (Time = "5:30:00 PM") then
begin
SetLightingState("lights", ON);
end;
once (Time = "10:00:00 PM") then
begin
SetLightingState("lights", OFF);
end;
What I want this to do is turn on and off a LED load of 1800mA, what I am asking is how I would do this as I have no to little idea on how to achieve this and want to learn