question on lights

Do you have a question on how to do something.
Ask in here.

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Tue Oct 11, 2016 5:49 am
working with this snippet

if ((hour()>=6 && hour()<9) || (hour()>=22 || hour()<23)) // Operates Moonlights twice a day
{
ReefAngel.Relay.On(Port2);
}
else
{
ReefAngel.Relay.Off(Port2);
}

How would I change that first time element to 630 AM instead of 6 AM. THX!
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Tue Oct 11, 2016 6:48 pm
Testing again tonite and this line isn't doing what I think it is. These port 2 lights are staying on. Thx in advance
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Wed Oct 12, 2016 3:24 am
I think this will fix it. :ugeek:

Code: Select all
  if (((hour()==6 && minute()>=30) || (hour()>6) && (hour()<9)) || (hour()>=22 && hour()<23)) // Operates Moonlights twice a day

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Wed Oct 12, 2016 8:19 am
I believe it has, thanks. I'll check it again tonite on the 10:00 PM run. Thanks again.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Thu Oct 13, 2016 3:03 am
Awesome!

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Thu Oct 13, 2016 5:16 am
works beautifully! Thanks again.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 1 guest