Buzzer goes off intermittently

Basic / Standard Reef Angel hardware
Post Reply
Smotz
Posts: 412
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Buzzer goes off intermittently

Post 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);
    }}
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Buzzer goes off intermittently

Post 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
Smotz
Posts: 412
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: Buzzer goes off intermittently

Post 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.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Buzzer goes off intermittently

Post by lnevo »

Ok, I'll throw something together next chance I get
Post Reply