Page 1 of 1

Need help with Feeding mode

Posted: Wed Aug 07, 2013 11:12 pm
by Amos Poh
Dear all i want to switch off this ports while on feeding mode and the off when feeding mode is over.

but it does goes off when on feeding mode and dosnt goes on again when feeding mode is over. what iam i lacking?
*Note that port3 and Box1_Port8 are on always on mode.

if (ReefAngel.DisplayedMenu==FEEDING_MODE)
{
ReefAngel.PWM.SetActinic(30);
ReefAngel.PWM.SetDaylight(30);
ReefAngel.PWM.SetChannel(0,75);
ReefAngel.Relay.Off( Port3 );
ReefAngel.Relay.Off( Box1_Port8 );
}

Re: Need help with Feeding mode

Posted: Thu Aug 08, 2013 3:09 am
by wideawake
You probably need an else statement to turn it on again

Re: Need help with Feeding mode

Posted: Thu Aug 08, 2013 9:03 am
by Amos Poh
wideawake wrote:You probably need an else statement to turn it on again
any idea how to code the else mode? :D

Re: Need help with Feeding mode

Posted: Thu Aug 08, 2013 9:39 am
by lnevo
if (ReefAngel.DisplayedMenu==FEEDING_MODE)
{
ReefAngel.PWM.SetActinic(30);
ReefAngel.PWM.SetDaylight(30);
ReefAngel.PWM.SetChannel(0,75);
ReefAngel.Relay.Off( Port3 );
ReefAngel.Relay.Off( Box1_Port8 );
} else {
ReefAngel.Relay.On(Box1_Port8);
}

Re: Need help with Feeding mode

Posted: Thu Aug 08, 2013 10:19 am
by Amos Poh
lnevo wrote:if (ReefAngel.DisplayedMenu==FEEDING_MODE)
{
ReefAngel.PWM.SetActinic(30);
ReefAngel.PWM.SetDaylight(30);
ReefAngel.PWM.SetChannel(0,75);
ReefAngel.Relay.Off( Port3 );
ReefAngel.Relay.Off( Box1_Port8 );
} else {
ReefAngel.Relay.On(Box1_Port8);
}

Thanks Lee :D

Re: Need help with Feeding mode

Posted: Thu Aug 08, 2013 8:52 pm
by Amos Poh
Amos Poh wrote:
lnevo wrote:if (ReefAngel.DisplayedMenu==FEEDING_MODE)
{
ReefAngel.PWM.SetActinic(30);
ReefAngel.PWM.SetDaylight(30);
ReefAngel.PWM.SetChannel(0,75);
ReefAngel.Relay.Off( Port3 );
ReefAngel.Relay.Off( Box1_Port8 );
} else {
ReefAngel.Relay.On(Box1_Port8);
}

Thanks Lee :D

Works :D Thanks