Page 1 of 1

Wave maker function question

Posted: Wed Sep 23, 2015 9:17 am
by djbm3
From my research it seems possible to have two power heads cycle back and fourth every 30 seconds but can I also have both of them turn on for 10 seconds every hour?

Re: Wave maker function question

Posted: Wed Sep 23, 2015 9:56 am
by rimai
Are you talking about DC pump or regular powerheads?
Possible for both of them, just different code.

Re: Wave maker function question

Posted: Wed Sep 23, 2015 9:58 am
by djbm3
Regular power heads....

Re: Wave maker function question

Posted: Wed Sep 23, 2015 10:00 am
by rimai
Can you post the code you are using?

Re: Wave maker function question

Posted: Wed Sep 23, 2015 10:15 am
by djbm3
I would assume default config as I have not done the install yet. I will be doing my install on Friday.
I do not need a code yet... just wondering if this can be done.

Re: Wave maker function question

Posted: Wed Sep 23, 2015 10:27 am
by rimai
When you are ready and tested the code you want to use for the wavemaker, go ahead and post the code and we can add the 10 second override for 10s every hour.

Re: Wave maker function question

Posted: Sat Sep 26, 2015 5:16 pm
by djbm3
Here is what I have setup now. Using ports 5,6 for the wavemaker with port 6 set to be opposite of main box port 5. Powerheads are cycling every 20 seconds. Can we add to the code to have both ports 5,6 turn on at the same time every 20 minutes for 12 seconds then back to the 20 second cycle?
I am ok if we have to do every hour as opposed to 20 minutes but prefer the 20min.


#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 <Humidity.h>
#include <DCPump.h>
#include <PAR.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
ReefAngel.AddStandardMenu(); // Add Standard Menu

ReefAngel.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port5Bit | Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 868 );


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

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


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

void loop()
{
ReefAngel.StandardHeater( Port1,765,780 );
ReefAngel.Wavemaker( Port5,20 );
ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
ReefAngel.StandardLights( Port7,17,0,10,30 );
////// Place your custom code below here


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

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

Re: Wave maker function question

Posted: Sun Sep 27, 2015 4:23 pm
by rimai
Try this:

Code: Select all

if (now()%1200<12)
{
  ReefAngel.Relay.On(Port5);
  ReefAngel.Relay.On(Port6);
}

Re: Wave maker function question

Posted: Sun Sep 27, 2015 7:48 pm
by djbm3
Do I paste this in this section?

////// Place your custom code below here


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

Re: Wave maker function question

Posted: Wed Sep 30, 2015 8:38 am
by djbm3
I have tried that code, but didn't see the change in the wavemakers, where does this need to be added to? Maybe I added this on the wrong line.

if (now()%1200<12)
{
ReefAngel.Relay.On(Port5);
ReefAngel.Relay.On(Port6);
}

Re: Wave maker function question

Posted: Wed Sep 30, 2015 8:41 am
by rimai
Yes, it is in the loop section.
It will turn them both on on the first 12s of every 1200s.

Re: Wave maker function question

Posted: Sat Jul 09, 2016 3:39 pm
by madweazl
I'm trying to get this functionality working as well and am not seeming to have any luck. What I think was supposed to happen in the code was that there would be a 5 second overlap every 90 seconds but that doesnt seem to be the case.

#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 <Humidity.h>
#include <DCPump.h>
#include <PAR.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
ReefAngel.AddStandardMenu(); // Add Standard Menu

ReefAngel.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port3Bit;
ReefAngel.FeedingModePortsE[0] = Port3Bit | Port5Bit | Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port8Bit;
ReefAngel.WaterChangePortsE[0] = Port3Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port4Bit;
ReefAngel.LightsOnPortsE[0] = Port3Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit;
ReefAngel.OverheatShutoffPortsE[0] = Port3Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 820 );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Box1_Port8 );

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


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

void loop()
{
ReefAngel.StandardHeater( Port2,796,798 );
ReefAngel.StandardLights( Port4,18,0,12,0 );
ReefAngel.StandardLights( Port5,10,0,22,0 );
ReefAngel.StandardLights( Port6,10,0,22,0 );
ReefAngel.StandardATO( Port8,1200 );
if (now()%90<5)
ReefAngel.Wavemaker( Box1_Port1,90 );
ReefAngel.Relay.Set( Box1_Port2, !ReefAngel.Relay.Status( Box1_Port1 ) );
ReefAngel.PWM.SetDaylight( PWMParabola(10,0,22,0,10,10,10) );
ReefAngel.PWM.SetActinic( PWMParabola(10,0,22,0,10,15,10) );
////// Place your custom code below here


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

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

Re: Wave maker function question

Posted: Sat Jul 09, 2016 8:56 pm
by rimai
Remove this line:

Code: Select all

if (now()%90<5)

Re: Wave maker function question

Posted: Sun Jul 10, 2016 12:14 pm
by madweazl
rimai wrote:Remove this line:

Code: Select all

if (now()%90<5)
OK, but is there a way to accomplish what I'm after?

Re: Wave maker function question

Posted: Sun Jul 10, 2016 5:56 pm
by rimai
Does it alternate though?

Re: Wave maker function question

Posted: Mon Jul 11, 2016 11:49 am
by madweazl
Alternates perfectly, was just hoping to have some overlap with both running for a short period so it would create a little more turbulence occasionally. Guess I can implement that once I get a dimming expansion and hook the pumps up to that.