Page 1 of 1

Will this code work for Dosing Pump

Posted: Fri Dec 09, 2011 2:52 pm
by JJones
I only want the dosing pump to turn on one time a day for one second--to dose vodka while I am out of town.

I am still new to coding, so want to make sure this code will accomplish that?

if (hour()==09 && minute()==0 && second()==1) //Alk Doser - Only works if Main screen is showing
ReefAngel.Relay.On(Port5); //Turn Doser on
else
ReefAngel.Relay.Off(Port5); //Turn Doser off

Re: Will this code work for Dosing Pump

Posted: Fri Dec 09, 2011 5:40 pm
by rimai
You got it :)
At exactly 9:00:01 AM, you will get the dosing pump turning on for just that second.

Re: Will this code work for Dosing Pump

Posted: Fri Dec 09, 2011 6:47 pm
by binder
That would work. My only comment would be to change the "09" to just be "9". The compiler may not like the 09. So you may want it to look like this:

Code: Select all

if (hour()==9 && minute()==0 && second()==1)
curt

Re: Will this code work for Dosing Pump

Posted: Fri Dec 09, 2011 8:51 pm
by JJones
Thank you both