Coding Jebao mode - otherwise use portal

Do you have a question on how to do something.
Ask in here.
Post Reply
cjrudy
Posts: 135
Joined: Sat Nov 10, 2012 2:47 pm

Coding Jebao mode - otherwise use portal

Post by cjrudy »

I know its on the forum somewhere but I couldn't find it.

How do code my WP25 and WP40 to use certain modes at certain times and any other time use whatever the portal is set to.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Coding Jebao mode - otherwise use portal

Post by rimai »

Something like this:

Code: Select all

if (hour()>=7 and hour()<10)
{
      ReefAngel.DCPump.UseMemory = false;
      ReefAngel.DCPump.SetMode(ShortPulse,30,70 );
}
else if (hour()>=10 || hour()<15)
{
      ReefAngel.DCPump.UseMemory = false;
      ReefAngel.DCPump.SetMode(ReefCrest,30,10 );
}
else
{
      ReefAngel.DCPump.UseMemory = true;
}
Roberto.
cjrudy
Posts: 135
Joined: Sat Nov 10, 2012 2:47 pm

Re: Coding Jebao mode - otherwise use portal

Post by cjrudy »

Thanks, Robero

Is the speed the first or second variable.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Coding Jebao mode - otherwise use portal

Post by Sacohen »

Speed is the first.

There is code in my INO and in PaulTurner911 INO that lnevo did that will randomly choose a different mode every day.
Post Reply