Page 1 of 1
Dosing Kalk for 1min Every 30min
Posted: Mon Feb 18, 2013 8:48 am
by Paulturner911
Could someone help me code this?
I would like port 4 to activate my stand alone ATO for 1min every half hour starting at 2am and stopping at 10am.
Thank You
Re: Dosing Kalk for 1min Every 30min
Posted: Mon Feb 18, 2013 1:08 pm
by Paulturner911
Does anyone have a code similar to this that I could modify? If I see the code maybe I can then figure out how to modify the port and times.
Any help would be great!
Thanks
Re: Dosing Kalk for 1min Every 30min
Posted: Mon Feb 18, 2013 1:21 pm
by lnevo
You could use the following
Code: Select all
if ( (hour() >=2) && (hour() <10) )
ReefAngel.Relay.Set(Port4, now()%1800<60);
else
ReefAngel.Relay.Off(Port4);
There's some explanation of how that works in this thread...
http://forum.reefangel.com/viewtopic.php?f=3&t=2612
Re: Dosing Kalk for 1min Every 30min
Posted: Mon Feb 18, 2013 1:56 pm
by Paulturner911
Awesome! Thanks so much. It looks like you have already made the editing for me. Im not sure I would have been able to grasp that on my own.
Re: Dosing Kalk for 1min Every 30min
Posted: Tue Feb 19, 2013 6:56 pm
by Paulturner911
I'm guessing I won't be able to see the activity in the portal since the cycle is only 30 seconds?
Dosing Kalk for 1min Every 30min
Posted: Tue Feb 19, 2013 7:01 pm
by lnevo
Nope
Re: Dosing Kalk for 1min Every 30min
Posted: Wed Feb 20, 2013 2:36 pm
by Paulturner911

Its obviously working since my water level is correct!!

Re: Dosing Kalk for 1min Every 30min
Posted: Wed Feb 20, 2013 6:41 pm
by Paulturner911
Today I checked relay activity and I was able to see 2 blips at 2:01 and 2:31...but no other? Any clue why this is?
Dosing Kalk for 1min Every 30min
Posted: Wed Feb 20, 2013 7:10 pm
by lnevo
Random luck...
Re: Dosing Kalk for 1min Every 30min
Posted: Wed Feb 20, 2013 7:50 pm
by Paulturner911
Sweet!
Re: Dosing Kalk for 1min Every 30min
Posted: Tue Feb 26, 2013 7:55 am
by Paulturner911
It seems Im falling behind on the ATO at this rate. If I wanted to change to dose length would I be correct in changing the BLUE and the frequency of the dosing
if ( (hour() >=2) && (hour() <10) )
ReefAngel.Relay.Set(Port4, now()%1800<60);
else
ReefAngel.Relay.Off(Port4);
I have already changed it from times 1am-12pm. Still not catching up. This morning I changed the 1800 to 900 which should mean 15min. Im undecided on which I should change to have a better impact on curving pH at night. Maybe leave the 1800 and dose for 2min?? Currently Im not raising the pH just "helping the down slope".
Feel free to chime in! Thanks
Dosing Kalk for 1min Every 30min
Posted: Tue Feb 26, 2013 8:41 am
by lnevo
You could change the <60 to <120 to make it dose for two minutes instead of one...
Re: Dosing Kalk for 1min Every 30min
Posted: Fri Mar 22, 2013 1:09 pm
by Paulturner911
If I want to run this overnight from pm to am. What is the easiest way to do so? Ive seen something on here about the PWM "overnight" function. Is there a sample of this for a relay?
I would like to start at 8pm (20) and end the next morning at 11am (11) every 15min for 20sec
Would I have to do 2 lines? Is there a way to shrink my code? I was thinking this:
if ( (hour() >=20) && (hour() <=23,59) )
ReefAngel.Relay.Set(Port4, now()%900<20);
else
ReefAngel.Relay.Off(Port4);
if ( (hour() >=0) && (hour() <=11) )
ReefAngel.Relay.Set(Port4, now()%900<20);
else
ReefAngel.Relay.Off(Port4);
Re: Dosing Kalk for 1min Every 30min
Posted: Fri Mar 22, 2013 1:17 pm
by lnevo
You could do this...which woudl cover both scenario..
if (hour() >=20 || hour() < 11) Greater than 20 or less then 11 (ending at 10:59)
Re: Dosing Kalk for 1min Every 30min
Posted: Fri Mar 22, 2013 1:36 pm
by Paulturner911
I see!! one of those OR logics!!! lol
Thanks Im gonna run with that!