16 hours light on and 8 hours off

hey all

i'm currently making an automatic garden that has artificial light but it has to lit for 16 hours straight and 8 hours off, but it also has a humidity sensor for the soil so when this gets to low a small 5v pump will kick in and water the soil until.

so my question: how can i easily turn the lights on/off while the pump also runs and how can i make hours easier to put in my program.

and sorry for my bad english i'm from belgium

Take a look at the blink without delay example in the IDE, without delay.

Are you doing the timing with the Arduino or are you using an external source (RTC, GPS, NTP server)?

How accurate does timing need to be?

AWOL:
Take a look at the blink without delay example in the IDE, without delay.

in the IDE, without delay.

Very nice :wink:

ok i figured it out thx for the help guys

An RTC is also an option, Arduino's Millis function should be good enough though.