Page 1 of 1

Topping Off

Posted: Sun Dec 04, 2011 10:29 am
by peitro
I am planning on using the two float switches independently (ATO High and ATO Low). The High switch is mounted in my sump. The low switch is mounted in my water reservoir.

If the High switch is not triggered (water is low in sump) and the Low switch is triggered (water in reservoir) I want the top off pump to kick in.

I define LowWarn as an int and set it to 0 in the top section of my pde. I have only been watching through 1 even hour, but it doesn't seem to be working like I want.

Code: Select all

// turn on top off pump up to 12 times a day if float switch allows
        // do not top off if low float switch is active
        
        LowWarn = digitalRead(lowATOPin);
        
        if ((hour() % 2 == 0) && (LowWarn == HIGH)){
        ReefAngel.SingleATOHigh(Port1);
        }
        else{
          ReefAngel.Relay.Off(Port1);
        }
Any help is appreciated.

Re: Topping Off

Posted: Sun Dec 04, 2011 10:48 am
by rimai

Code: Select all

if ((hour() % 2 == 0) && (LowWarn == HIGH)){
This comparison is also checking for even hours. So your ATO would only kick in on even hours.

Re: Topping Off

Posted: Sun Dec 04, 2011 11:13 am
by peitro
I had downloaded the code a few minutes after 12. I thought it would be able to trigger the top off through the entire 12 o-clock hour? Wasn't sure if HIGH was the proper word to use?

Re: Topping Off

Posted: Sun Dec 04, 2011 12:04 pm
by peitro
It is working correctly as is. I forgot I had the ATO set so it will wait an hour before it goes on again. That was why it looked like it didn't work when I tested it.

Thanks,