I have the below code installed and it seems to be working with the exception of the buzzer going off for a second or two intermittently. Are there just brief unavoidable fluctuations?
// Buzzer if temp is too high or low, or waterlevel 1 is too high or too low.
if (ReefAngel.DisplayedMenu!=WATERCHANGE_MODE && ReefAngel.DisplayedMenu!=FEEDING_MODE) // Only check if not Feeding Mode or Water Change Mode
{
if ( ReefAngel.Params.Temp[T2_PROBE] < 700 || ReefAngel.Params.Temp[T2_PROBE] > 850 || ReefAngel.WaterLevel.GetLevel(1) > 135 || ReefAngel.WaterLevel.GetLevel(1) < 70)
{
pinMode(lowATOPin,OUTPUT);
digitalWrite(lowATOPin,HIGH);
}
else
{
pinMode(lowATOPin,OUTPUT);
digitalWrite(lowATOPin,LOW);
}}
Sensors in general can fluctuate. It would be the same as an ATO or heater port. If you can change the logic to set a flag when low and a unflag at high you can set a gap so when the waterlevel is bouncing around at 70/69 it wont be going intermittently
lnevo wrote:Sensors in general can fluctuate. It would be the same as an ATO or heater port. If you can change the logic to set a flag when low and a unflag at high you can set a gap so when the waterlevel is bouncing around at 70/69 it wont be going intermittently
Thanks dude.
I understand the logic but I don't think I am capable of that coding.