Turn relay on/off at specific times
Posted: Fri Mar 03, 2017 11:26 pm
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!
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!