Page 1 of 1
How can I write custom code for BRS doser?
Posted: Sat Mar 21, 2015 6:14 pm
by skehole
Hi guys and gals. I'm a RA noob
I'm playing with the wizard as I prepare to get my RA setup in the near future. The code generator doesn't fit my application for dosing vinegar. I'm currently dosing every hour from 1pm to 9pm, for a total of 9 doses at 3 min run time each. I do this to dose during times of highest PH. The wizard only allows to dose every x minutes for y amount of time.
How would I accomplish this and then, where do I place the code once generated?
Many thanks!
Sean
Re: How can I write custom code for BRS doser?
Posted: Sat Mar 21, 2015 6:33 pm
by cosmith71
I think something like this should work. Put it in loop() and change Port1 to whatever port you're using on the relay box.
Code: Select all
if (hour() >=13 && hour() <=21)
{
ReefAngel.DosingPumpRepeat( Port1,0,60,180 );
}
else
{
ReefAngel.Relay.Off(Port1);
}
--Colin
Re: How can I write custom code for BRS doser?
Posted: Sun Mar 22, 2015 9:57 am
by skehole
Thank you so much!
Does the >=13 telling the contoller to dose at 1pm and later?
Re: How can I write custom code for BRS doser?
Posted: Sun Mar 22, 2015 10:02 am
by cosmith71
Yep. Greater than or equal to 1300 (1 PM) and less than or equal to 2100.
You're welcome!
Re: How can I write custom code for BRS doser?
Posted: Sun Mar 22, 2015 11:17 am
by skehole
Gotcha. Thank you so much. I'm trying to also understand the method and reasoning behind it all. I did some very basic programming almost 20 years ago in high school
Re: How can I write custom code for BRS doser?
Posted: Sun Mar 22, 2015 11:55 am
by cosmith71
Re: How can I write custom code for BRS doser?
Posted: Tue Mar 31, 2015 8:05 pm
by skehole
cosmith71 wrote:I think something like this should work. Put it in loop() and change Port1 to whatever port you're using on the relay box.
Code: Select all
if (hour() >=13 && hour() <=21)
{
ReefAngel.DosingPumpRepeat( Port1,0,60,180 );
}
else
{
ReefAngel.Relay.Off(Port1);
}
--Colin
I just realized you said to put it in loop. Is there somewhere I need to add () in that code line you wrote?
Re: How can I write custom code for BRS doser?
Posted: Wed Apr 01, 2015 3:13 am
by cosmith71
Nope. Just copy and paste it in the loop section along with your other stuff. There should be a line that reads "Put custom code here" or similar.
--Colin