Wavemaker code help

Do you have a question on how to do something.
Ask in here.
Post Reply
treetopflyn
Posts: 88
Joined: Fri Oct 05, 2012 1:58 am

Wavemaker code help

Post by treetopflyn »

Looking to have my wavemaker on Port 6 turn on at 8:00am and turn off at 7:00pm. Current code below.
Thanks in advance.

#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>

////// Place global variable code below here


////// Place global variable code above here


void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port2Bit | Port4Bit | Port5Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 940 );


// Ports that are always on
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );

////// Place additional initialization code below here


////// Place additional initialization code above here
}

void loop()
{
ReefAngel.StandardATO( Port1,30 );
ReefAngel.StandardFan( Port3,765,780 );
ReefAngel.StandardLights( Port4,7,30,22,0 );
ReefAngel.WavemakerRandom( Port6,60,300 );
////// Place your custom code below here


////// Place your custom code above here

// This should always be the last line
ReefAngel.Portal( "treetopflyn" );
ReefAngel.ShowInterface();
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wavemaker code help

Post by rimai »

Replace this:

Code: Select all

ReefAngel.WavemakerRandom( Port6,60,300 );
With this:

Code: Select all

if (hour()>=8 && hour()<19)
  ReefAngel.WavemakerRandom( Port6,60,300 );
else
  ReefAngel.Relay.Off(Port6);
Roberto.
treetopflyn
Posts: 88
Joined: Fri Oct 05, 2012 1:58 am

Re: Wavemaker code help

Post by treetopflyn »

As usual thank you very much!!
treetopflyn
Posts: 88
Joined: Fri Oct 05, 2012 1:58 am

Re: Wavemaker code help

Post by treetopflyn »

Finally got around to messing with this been working like a dog. For some reason port 6 is not coming on now

#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>

////// Place global variable code below here


////// Place global variable code above here


void setup()
{
    // This must be the first line
    ReefAngel.Init(); //Initialize controller
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port1Bit | Port2Bit | Port4Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 940 );


    // Ports that are always on
    ReefAngel.Relay.On( Port2 );
    ReefAngel.Relay.On( Port7 );
    ReefAngel.Relay.On( Port8 );

    ////// Place additional initialization code below here
    

    ////// Place additional initialization code above here
}

void loop()
{
    ReefAngel.StandardATO( Port1,30 );
    ReefAngel.StandardFan( Port3,765,780 );
    ReefAngel.WavemakerRandom( Port5,600,1800 );
    if (hour()>=8 && hour()<19)
  ReefAngel.WavemakerRandom( Port6,60,300 );
else
  ReefAngel.Relay.Off(Port6);
    ////// Place your custom code below here
    

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.Portal( "treetopflyn" );
    ReefAngel.ShowInterface();
}


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

Re: Wavemaker code help

Post by rimai »

It's because of the Port5 using the same function.
Do you also want port5 to be totally random and work all the time?
Roberto.
treetopflyn
Posts: 88
Joined: Fri Oct 05, 2012 1:58 am

Re: Wavemaker code help

Post by treetopflyn »

Yes. 5 is my Jebo WP-40 that has the light sensor so it cranks down at night. I would like it to stay on. Actually if possible I would like port 6 to go on an off at 5 min intervals. I am tired of hearing the damn clicking of the Korilla all the time.

Of course once I get the harness and some codes are written I will switch the WP40 to be controlled fully by the RA :-)

Thanks for your help.

K
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wavemaker code help

Post by rimai »

Try this:

Code: Select all

    if (hour()>=8 && hour()<19)
  ReefAngel.Wavemaker( Port6,300 );
else
  ReefAngel.Relay.Off(Port6);
Roberto.
Paulturner911
Posts: 287
Joined: Wed Jan 23, 2013 12:36 pm

Re: Wavemaker code help

Post by Paulturner911 »

I have a few questions about the WP40.
Kevin said he is running at 16v right now, Ive seen the video and thats too much flow for my placement. What is the operating voltage range on that pump. I would love to have one of these. How much could I dial it down once Roberto has the harness ready? My understanding it the WP25 may be more for nano reefs. Any input would be great.

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

Re: Wavemaker code help

Post by rimai »

The operating voltage is 24V.
What the person you mentioned is probably doing is a hack work around in my point of view.... lol
He is reducing the operating voltage to try to reduce the speed.
Why?
Because he probably has no other means of controlling the speed and he's trying to use the controller that came with it.
With RA, you can set the speed to whatever you want and still operate at 24V, which the pump was designed to do.
The lowest speed is pretty low. Not as low as a Vortech in night mode, but it's very low.
The highest speed is very good flow and you can go anywhere in between and create any waveform you wish :)
Roberto.
treetopflyn
Posts: 88
Joined: Fri Oct 05, 2012 1:58 am

Re: Wavemaker code help

Post by treetopflyn »

rimai wrote:The operating voltage is 24V.
What the person you mentioned is probably doing is a hack work around in my point of view.... lol
He is reducing the operating voltage to try to reduce the speed.
Why?
Because he probably has no other means of controlling the speed and he's trying to use the controller that came with it.
That is exactly what I am doing. As soon as the harness is ready (hint hint), I will run at 24v controlling it with the RA. :mrgreen:
Paulturner911
Posts: 287
Joined: Wed Jan 23, 2013 12:36 pm

Re: Wavemaker code help

Post by Paulturner911 »

Im in! Placing the order today. Ill keep an eye out for the harness.
Image
Post Reply