I want to run a function only if pH is less than 8.0. Is the proper way to do so something like the following syntax? I guess my question really is "how do I query pH?"
Yes but there is a problem with that. The probes fluctuate a lot so it will flicker between 799-801 for instance changing every few ms. The logic you have will turn that port on and off a lot.
We have a function you can use similar to the heater function
ReefAngel.PHControl(relay, lowph, highph);
This will allow you to set a range for when it turns on to when it turns off.
This function turns the device on when ph <= lowph and off when ph >= highph
There is another function CO2Control that takes the same args but does the opposite.