How to program a delay after water change mode

Do you have a question on how to do something.
Ask in here.
Post Reply
skehole
Posts: 75
Joined: Fri Feb 13, 2015 4:58 pm

How to program a delay after water change mode

Post by skehole »

hi guys. Here is my code

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 <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.Use2014Screen();  // Let's use 2014 Screen 
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port3Bit | 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 = 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( 830 );


    // Ports that are always on
    ReefAngel.Relay.On( Port3 );
    ReefAngel.Relay.On( Port5 );
    ReefAngel.Relay.On( Port6 );
    ReefAngel.Relay.On( Port7 );
    ReefAngel.Relay.On( Port8 );

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

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

void loop()
{
    ReefAngel.StandardHeater( Port1,775,780 );
    ReefAngel.StandardLights( Port2,22,0,11,30 );
    ReefAngel.DosingPumpRepeat( Port4,0,0,0 );
    ////// Place your custom code below here
    if (hour() >=13 && hour() <=21)
  {
    ReefAngel.DosingPumpRepeat( Port4,0,60,180 );
  }
  else
  {
    ReefAngel.Relay.Off(Port4);
  }
 

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

    // This should always be the last line
    ReefAngel.Portal( "skehole" );
    ReefAngel.DDNS( "fishtank" ); // Your DDNS is skehole-fishtank.myreefangel.com
    ReefAngel.ShowInterface();
}

I am wondering how to delay a port to come on, say 20 minutes after a water change? I would like my ATO to have a delay so my sump level can be established before the ato kicks on.
Image
skehole
Posts: 75
Joined: Fri Feb 13, 2015 4:58 pm

How to program a delay after water change mode

Post by skehole »

Maybe a "lost in the shuffle" bump? Happy Monday everyone.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to program a delay after water change mode

Post by rimai »

Roberto.
skehole
Posts: 75
Joined: Fri Feb 13, 2015 4:58 pm

Re: How to program a delay after water change mode

Post by skehole »

Thanks!

Next time I'll try the search function....whoops!
Image
Post Reply