Page 1 of 1

Buzzer goes off intermittently

Posted: Mon Jul 18, 2016 2:32 pm
by Smotz
'Lo all.

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?

Code: Select all

// 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);
    }}

Re: Buzzer goes off intermittently

Posted: Mon Jul 18, 2016 5:23 pm
by lnevo
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

Re: Buzzer goes off intermittently

Posted: Tue Jul 19, 2016 4:22 am
by Smotz
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.

Re: Buzzer goes off intermittently

Posted: Wed Jul 20, 2016 4:49 am
by lnevo
Ok, I'll throw something together next chance I get