Page 1 of 1

Wp40 feed mode

Posted: Fri Jun 07, 2013 12:59 pm
by jjdezek
I have my wp40 hooked up to the PWM port on the relay box and when I select feed mode it doesn't change it. How can I set the PWM ports on the relay box to turn off during feed mode?

Re: Wp40 feed mode

Posted: Fri Jun 07, 2013 2:06 pm
by ReeferBee

Code: Select all

if( ReefAngel.DisplayedMenu==FEEDING_MODE )
 {
   ReefAngel.PWM.SetActinic(0);
   ReefAngel.PWM.SetDaylight(0);
}
depending on which pwm port your wp40 is connected to you may need to take away daylight or actinic.

Re: Wp40 feed mode

Posted: Fri Jun 07, 2013 2:07 pm
by binder
jjdezek wrote:I have my wp40 hooked up to the PWM port on the relay box and when I select feed mode it doesn't change it. How can I set the PWM ports on the relay box to turn off during feed mode?
You could do something like this:

Code: Select all

if ( ReefAngel.DisplayedMenu == FEEDING_MODE ) {
    ReefAngel.PWM.SetDaylight(0);
} else {
    ReefAngel.PWM.SetDaylight(100);
}
That would set the PWM Daylight port to 0 when you are in feeding mode then back to 100% when not in feeding mode.
What you would do, is put your standard controlling mode/functionality in the else statement where I set the PWM percent to 100%. There are lots of other examples on the forum, you just need to search for FEEDING_MODE and that should give you examples.

Re: Wp40 feed mode

Posted: Fri Jun 07, 2013 3:52 pm
by jjdezek
So I just put that in the place custom code space?

Re: Wp40 feed mode

Posted: Fri Jun 07, 2013 4:25 pm
by lnevo
I would go with reeferbee's code and make sure it is the last thing before the

////place custom code above this line

Re: Wp40 feed mode

Posted: Fri Jun 07, 2013 4:29 pm
by jjdezek
Ok cool thanks.