-Turn wavemaker on nutrient transport mode after feeding is over for 4 hours.
-Turn DC pump off for 2 hours after entering feeding mode.
-I also want my protein skimmer to remain off for 4 hours after pressing the feeding button.
could anyone point me in the right direction with a example of that?
Im mostly confused on where do i place the custom code in my current code. Also could someone explain to me how do i get my code to show up in a scroll box in a post? I cant seem to figure it out. I press the CODE button and insert my code.
Thanks for all the help.
Code: Select all
#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 <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.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.AddPHExpansion(); // pH Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
ReefAngel.FeedingModePortsE[0] = Port1Bit | Port2Bit | Port4Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
ReefAngel.WaterChangePortsE[0] = Port1Bit | Port2Bit | Port4Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit;
ReefAngel.LightsOnPortsE[0] = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit | Port8Bit;
ReefAngel.OverheatShutoffPortsE[0] = Port3Bit | Port4Bit | Port5Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 829 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=100;
// Ports that are always on
ReefAngel.Relay.On( Box1_Port1 );
ReefAngel.Relay.On( Box1_Port2 );
ReefAngel.Relay.On( Box1_Port3 );
ReefAngel.Relay.On( Box1_Port5 );
ReefAngel.Relay.On( Box1_Port7 );
ReefAngel.Relay.On( Box1_Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port1,14,30,20,00 ); ////// White t5
ReefAngel.StandardLights( Port2,13,00,22,00 ); ////// blue t5
ReefAngel.StandardLights( Port3,12,00,23,00 ); ////// reefblok blue
ReefAngel.StandardLights( Port4,14,00,21,00 ); ////// reefblok white
ReefAngel.StandardLights( Port5,14,30,21,00 ); ////// custom led
ReefAngel.StandardLights( Port6,14,0,23,0 ); ////// uv
ReefAngel.StandardLights( Port7,22,0,13,0 ); ////// night light
ReefAngel.StandardHeater( Port8,800,820 );
ReefAngel.StandardLights ( Box1_Port4, 12,0,22,00 ); ////// protein skimmer
ReefAngel.SingleATO( true,Box1_Port6,66,0 );
ReefAngel.PWM.SetChannel( 0, PWMSlope(13,30,22,0,5,40,60,5) ); ////// whites
ReefAngel.PWM.SetChannel( 1, PWMSlope(12,0,23,0,5,100,60,20) ); ////// blue reefblok
ReefAngel.PWM.SetChannel( 2, PWMSlope(14,0,22,0,5,100,60,5) ); ////// blue
ReefAngel.PWM.SetChannel( 3, MoonPhase() );
ReefAngel.PWM.SetDaylight (62); ////// Dc pump
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( NutrientTransport,90,100 ); ////// wavemaker
ReefAngel.DCPump.ActinicChannel = Sync;
ReefAngel.DCPump.ExpansionChannel[0] = None;
ReefAngel.DCPump.ExpansionChannel[1] = None;
ReefAngel.DCPump.ExpansionChannel[2] = None;
ReefAngel.DCPump.ExpansionChannel[3] = None;
ReefAngel.DCPump.ExpansionChannel[4] = None;
ReefAngel.DCPump.ExpansionChannel[5] = None;
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Dctrojan" );
ReefAngel.ShowInterface();
}