Do action at certain time using RTC

dhenry:

i am struggling to find any readup on how to program an RTC

The simplest would be to use your arduino to keep time: presumably the arduino is running all the time.

... and the least accurate.

Your 8pm light switch-on will end up at 4am after a while :wink:

The Arduino isn't great at timing, chiefly because the resonator used for it isn't that accurate. Plus the millis() function isn't all that accurate - it relies on a timer interrupt, and that can be delayed by other things happening when interrupts are disabled, or other interrupts are happening.

Not a good idea.