Wave maker function question

Do you have a question on how to do something.
Ask in here.
Post Reply
User avatar
djbm3
Posts: 20
Joined: Thu Sep 17, 2015 12:02 pm
Location: Denver
Contact:

Wave maker function question

Post 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?
Blend-FM.com Faded Friday's every Friday night at: https://www.stream.me/BlendFM

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

Re: Wave maker function question

Post by rimai »

Are you talking about DC pump or regular powerheads?
Possible for both of them, just different code.
Roberto.
User avatar
djbm3
Posts: 20
Joined: Thu Sep 17, 2015 12:02 pm
Location: Denver
Contact:

Re: Wave maker function question

Post by djbm3 »

Regular power heads....
Blend-FM.com Faded Friday's every Friday night at: https://www.stream.me/BlendFM

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

Re: Wave maker function question

Post by rimai »

Can you post the code you are using?
Roberto.
User avatar
djbm3
Posts: 20
Joined: Thu Sep 17, 2015 12:02 pm
Location: Denver
Contact:

Re: Wave maker function question

Post 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.
Blend-FM.com Faded Friday's every Friday night at: https://www.stream.me/BlendFM

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

Re: Wave maker function question

Post 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.
Roberto.
User avatar
djbm3
Posts: 20
Joined: Thu Sep 17, 2015 12:02 pm
Location: Denver
Contact:

Re: Wave maker function question

Post 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();
}
Blend-FM.com Faded Friday's every Friday night at: https://www.stream.me/BlendFM

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

Re: Wave maker function question

Post by rimai »

Try this:

Code: Select all

if (now()%1200<12)
{
  ReefAngel.Relay.On(Port5);
  ReefAngel.Relay.On(Port6);
}
Roberto.
User avatar
djbm3
Posts: 20
Joined: Thu Sep 17, 2015 12:02 pm
Location: Denver
Contact:

Re: Wave maker function question

Post by djbm3 »

Do I paste this in this section?

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


////// Place your custom code above here
Blend-FM.com Faded Friday's every Friday night at: https://www.stream.me/BlendFM

Image
User avatar
djbm3
Posts: 20
Joined: Thu Sep 17, 2015 12:02 pm
Location: Denver
Contact:

Re: Wave maker function question

Post 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);
}
Blend-FM.com Faded Friday's every Friday night at: https://www.stream.me/BlendFM

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

Re: Wave maker function question

Post by rimai »

Yes, it is in the loop section.
It will turn them both on on the first 12s of every 1200s.
Roberto.
User avatar
madweazl
Posts: 44
Joined: Tue Dec 03, 2013 3:08 am
Location: Fredericksburg, VA

Re: Wave maker function question

Post 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();
}
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave maker function question

Post by rimai »

Remove this line:

Code: Select all

if (now()%90<5)
Roberto.
User avatar
madweazl
Posts: 44
Joined: Tue Dec 03, 2013 3:08 am
Location: Fredericksburg, VA

Re: Wave maker function question

Post 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?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave maker function question

Post by rimai »

Does it alternate though?
Roberto.
User avatar
madweazl
Posts: 44
Joined: Tue Dec 03, 2013 3:08 am
Location: Fredericksburg, VA

Re: Wave maker function question

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