Will this code work for Dosing Pump

Basic / Standard Reef Angel hardware
Post Reply
JJones
Posts: 21
Joined: Fri Dec 09, 2011 2:49 pm

Will this code work for Dosing Pump

Post 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
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Will this code work for Dosing Pump

Post by rimai »

You got it :)
At exactly 9:00:01 AM, you will get the dosing pump turning on for just that second.
Roberto.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Will this code work for Dosing Pump

Post 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
JJones
Posts: 21
Joined: Fri Dec 09, 2011 2:49 pm

Re: Will this code work for Dosing Pump

Post by JJones »

Thank you both
Image
Post Reply