Need help with Feeding mode

Do you have a question on how to do something.
Ask in here.
Post Reply
Amos Poh
Posts: 107
Joined: Sun Jul 22, 2012 4:51 am
Location: Singapore

Need help with Feeding mode

Post 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 );
}
wideawake
Posts: 29
Joined: Mon May 20, 2013 3:55 am

Re: Need help with Feeding mode

Post by wideawake »

You probably need an else statement to turn it on again
Amos Poh
Posts: 107
Joined: Sun Jul 22, 2012 4:51 am
Location: Singapore

Re: Need help with Feeding mode

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

Re: Need help with Feeding mode

Post 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);
}
Amos Poh
Posts: 107
Joined: Sun Jul 22, 2012 4:51 am
Location: Singapore

Re: Need help with Feeding mode

Post 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
Amos Poh
Posts: 107
Joined: Sun Jul 22, 2012 4:51 am
Location: Singapore

Re: Need help with Feeding mode

Post 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
Post Reply