Sorry about the noob question
I have a small powerhead id like to turn on for a few minutes at a time multiple times during the day. I use it to create some turbulent water in my sump when my doser comes on. I want it to come on at around 4:50am till 5:10am then at the same intervals at 6am 9pm and 10 pm. THis is what I tried but it just leaves the pump on:
if (hour()>=4,53 && hour()<5,07)
{
ReefAngel.Relay.On(Port7);
}
else
{
ReefAngel.Relay.Off(Port7);
}
if (hour()>=5,53 && hour()<6,07)
{
ReefAngel.Relay.On(Port7);
}
else
{
ReefAngel.Relay.Off(Port7);
}
if (hour()>=20,53 && hour()<21,07)
{
ReefAngel.Relay.On(Port7);
}
else
{
ReefAngel.Relay.Off(Port7);
}
if (hour()>=21,53 && hour()<22,07)
{
ReefAngel.Relay.On(Port7);
}
else
{
ReefAngel.Relay.Off(Port7);
}
Thanks for any help! You guys are awesome!
Turn relay on/off at specific times
Re: Turn relay on/off at specific times
Your if statements need to look like this:
Just change the hour and minutes appropriately for each section. I think the rest is fine.
--Colin
Code: Select all
if ((hour() >= 4 && minute() >= 53) && (hour() <5 && minute() < 7))
--Colin
Re: Turn relay on/off at specific times
Oh perfect! Thanks Colin!
Re: Turn relay on/off at specific times
You're welcome!