How do I see if a relay port is on or off

Do you have a question on how to do something.
Ask in here.
Post Reply
dmglakewood
Posts: 26
Joined: Thu Mar 01, 2012 1:31 pm

How do I see if a relay port is on or off

Post by dmglakewood »

I'm just trying to see if port 5 is currently on or off. I can write the rest of the code I just need to do a check first. I tried to do some searching but came up with nothing.

Thanks
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How do I see if a relay port is on or off

Post by rimai »

Code: Select all

if ( ReefAngel.Relay.Status(Port5) )
{
//Do something if port 5 is on
}
Roberto.
dmglakewood
Posts: 26
Joined: Thu Mar 01, 2012 1:31 pm

Re: How do I see if a relay port is on or off

Post by dmglakewood »

Thanks rimai just what I was looking for
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: How do I see if a relay port is on or off

Post by alexwbush »

this is extremely helpful for moonlights programmed on the same PWM as actinics!

I'm going to try this later:

Code: Select all

if(!ReefAngel.Relay.Status(Port2))
{
    ReefAngel.PWM.SetActinic(MoonPhase());
}
else ReefAngel.PWM.ActinicPWMParabola();
Post Reply