Dosing Pump w/ .9.9 Question
Posted: Sat Jun 30, 2012 6:42 pm
My dosing pump code is rather long/outdated. I noticed several changes to this function. Just curious if there's a cleaner way to do it than my current code, which has them turn on at midnight dosing 2-3 secs every hour until 6am. I was hoping to use the new DosingPump/DosingPumpRepeat functions to dose the same intervals, only starting at 10pm instead of midnight. Here's my current code (which doesn't take into account dosing before midnight):
If this is still the way to do it that's fine, I just wasnt sure how start at 10 pm since using didn't seem to work for starting at 10.
Thanks!
Code: Select all
//Dose Alk
if ( ReefAngel.DisplayedMenu == DEFAULT_MENU ) //Alk Doser - Only works if Main screen is showing
{
/* && = and || = or
Hours between 12:05am and 6:05am
minute must be 0 (top of the hour)
seconds less than 3 (up to 3 seconds)
*/
if ( ((hour() >= 0) && (hour() <= 6)) && (minute() == 5) && //dose time
(second() < 3) ) //dose duration
{
ReefAngel.Relay.On(AlkDoser);
}
else
{
ReefAngel.Relay.Off(AlkDoser);
}
}
Code: Select all
if ( ((hour() >= 22) && (hour() <= 6)) && (minute() == 5)
Thanks!