Dosing Kalk for 1min Every 30min
-
Paulturner911
- Posts: 287
- Joined: Wed Jan 23, 2013 12:36 pm
Dosing Kalk for 1min Every 30min
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
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
-
Paulturner911
- Posts: 287
- Joined: Wed Jan 23, 2013 12:36 pm
Re: Dosing Kalk for 1min Every 30min
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
Any help would be great!
Thanks
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: Dosing Kalk for 1min Every 30min
You could use the following
There's some explanation of how that works in this thread... http://forum.reefangel.com/viewtopic.php?f=3&t=2612
Code: Select all
if ( (hour() >=2) && (hour() <10) )
ReefAngel.Relay.Set(Port4, now()%1800<60);
else
ReefAngel.Relay.Off(Port4);
-
Paulturner911
- Posts: 287
- Joined: Wed Jan 23, 2013 12:36 pm
Re: Dosing Kalk for 1min Every 30min
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.
-
Paulturner911
- Posts: 287
- Joined: Wed Jan 23, 2013 12:36 pm
Re: Dosing Kalk for 1min Every 30min
I'm guessing I won't be able to see the activity in the portal since the cycle is only 30 seconds?
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
-
Paulturner911
- Posts: 287
- Joined: Wed Jan 23, 2013 12:36 pm
-
Paulturner911
- Posts: 287
- Joined: Wed Jan 23, 2013 12:36 pm
Re: Dosing Kalk for 1min Every 30min
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?
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
-
Paulturner911
- Posts: 287
- Joined: Wed Jan 23, 2013 12:36 pm
-
Paulturner911
- Posts: 287
- Joined: Wed Jan 23, 2013 12:36 pm
Re: Dosing Kalk for 1min Every 30min
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
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
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Dosing Kalk for 1min Every 30min
You could change the <60 to <120 to make it dose for two minutes instead of one...
-
Paulturner911
- Posts: 287
- Joined: Wed Jan 23, 2013 12:36 pm
Re: Dosing Kalk for 1min Every 30min
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);
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);
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: Dosing Kalk for 1min Every 30min
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)
if (hour() >=20 || hour() < 11) Greater than 20 or less then 11 (ending at 10:59)
-
Paulturner911
- Posts: 287
- Joined: Wed Jan 23, 2013 12:36 pm
Re: Dosing Kalk for 1min Every 30min
I see!! one of those OR logics!!! lol
Thanks Im gonna run with that!
Thanks Im gonna run with that!