Wave maker function question

Do you have a question on how to do something.
Ask in here.

Posts: 12507
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Wed Sep 30, 2015 8:41 am
Yes, it is in the loop section.
It will turn them both on on the first 12s of every 1200s.
Roberto.
User avatar
Posts: 44
Joined: Tue Dec 03, 2013 3:08 am
Location: Fredericksburg, VA
PostPosted: Sat Jul 09, 2016 3:39 pm
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

Posts: 12507
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat Jul 09, 2016 8:56 pm
Remove this line:
Code: Select all
if (now()%90<5)
Roberto.
User avatar
Posts: 44
Joined: Tue Dec 03, 2013 3:08 am
Location: Fredericksburg, VA
PostPosted: Sun Jul 10, 2016 12:14 pm
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

Posts: 12507
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun Jul 10, 2016 5:56 pm
Does it alternate though?
Roberto.
User avatar
Posts: 44
Joined: Tue Dec 03, 2013 3:08 am
Location: Fredericksburg, VA
PostPosted: Mon Jul 11, 2016 11:49 am
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
Previous

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 5 guests

cron