How can I write custom code for BRS doser?

Do you have a question on how to do something.
Ask in here.
Post Reply
skehole
Posts: 75
Joined: Fri Feb 13, 2015 4:58 pm

How can I write custom code for BRS doser?

Post 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
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: How can I write custom code for BRS doser?

Post 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
skehole
Posts: 75
Joined: Fri Feb 13, 2015 4:58 pm

Re: How can I write custom code for BRS doser?

Post by skehole »

Thank you so much!

Does the >=13 telling the contoller to dose at 1pm and later?
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: How can I write custom code for BRS doser?

Post by cosmith71 »

Yep. Greater than or equal to 1300 (1 PM) and less than or equal to 2100.

You're welcome!
skehole
Posts: 75
Joined: Fri Feb 13, 2015 4:58 pm

Re: How can I write custom code for BRS doser?

Post 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
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: How can I write custom code for BRS doser?

Post by cosmith71 »

skehole
Posts: 75
Joined: Fri Feb 13, 2015 4:58 pm

Re: How can I write custom code for BRS doser?

Post 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?
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: How can I write custom code for BRS doser?

Post 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
Post Reply