Dosing pumps and PH

Do you have a question on how to do something.
Ask in here.
Post Reply
projectx
Posts: 120
Joined: Sat Apr 23, 2011 6:53 pm

Dosing pumps and PH

Post by projectx »

I was thinking about this tonight, is there a way to set the dosing pumps NOT to run if the PH is at 8.20 and if it should drop below 8.0 to have them start running again?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Dosing pumps and PH

Post by rimai »

yeah :)
You need to declare a new variable to hold the status for the dosing.
Place this above setup:

Code: Select all

boolean CanDose=true;
Then use this on the loop:

Code: Select all

  if (ReefAngel.Params.PH<=800) CanDose=true;
  if (ReefAngel.Params.PH>=820) CanDose=false;
  if (CanDose)
  {
    // Insert your dosing function here
  }
Try this and let me know if it works for you.
Roberto.
projectx
Posts: 120
Joined: Sat Apr 23, 2011 6:53 pm

Re: Dosing pumps and PH

Post by projectx »

cool thanks, Place the boolean above wich setup? toward the top near where all of the .h files are listed?

I wish I knew how to do this suff....... but I am learning lol
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Dosing pumps and PH

Post by rimai »

Yeah, if you look at your code, there is basically 3 sections.
The first is the one with a bunch of .h header files
The second is a setup() function
The third is a loop() function
So, yes anywhere above setup or just below the .h file is fine. :)
Roberto.
Post Reply