When in feeding mode my Return Pump (Port3) turns off, it is not a DC pump so I cannot ramp it up. To speed up the air bubbles getting out of the water I have been turning off my WP40 (Port7) for a few minutes then turning it back on.
How can I code Port 7 to turn off when ever my return pump (Port3) turns on and to then turn on, 3 minutes later?
I am not trying to mask Port 3, I do not want my WP40 to turn off if port 3 is off, I want it to turn off when port 3 first turns on, and then delay start
Delay a port turn on after feeding mode
Re: Delay a port turn on after feeding mode
Try this:
Code: Select all
static unsigned long lastPortOff=now()-180;
static boolean lastPortStatus=true;
if (!lastPortStatus && ReefAngel.Relay.Status(Port3))
{
lastPortOff=now();
}
lastPortStatus=ReefAngel.Relay.Status(Port3);
ReefAngel.Relay.Set(Port7,now()-lastPortOff>180)
Roberto.
Re: Delay a port turn on after feeding mode
Thank you, will try it when I get home tonight.
Re: Delay a port turn on after feeding mode
Roberto, it worked like a charm. I turn off port 3, when I turn it on Port 7 turns off and turns on 3 minutes later.
However, when the power is cycled and the controller turns on for the first time, Port 7 turns on with no delay. What can I do to make it delay as well during a power cycle?
However, when the power is cycled and the controller turns on for the first time, Port 7 turns on with no delay. What can I do to make it delay as well during a power cycle?
Re: Delay a port turn on after feeding mode
Nevermind, didn't realize you had Delayed start in the Wizard.
Code: Select all
ReefAngel.Relay.DelayedOn( Port7,3 );