Multiple Light On Times

Do you have a question on how to do something.
Ask in here.
Post Reply
bkc6868
Posts: 95
Joined: Wed Sep 02, 2015 4:39 pm

Re: Multiple Light On Times

Post by bkc6868 »

Here is my wizard code. I took the custom code from above out

Code: Select all

[/co#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 = Port2Bit | Port4Bit | Port5Bit | Port7Bit | Port8Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port2Bit | Port4Bit | Port5Bit | Port7Bit | Port8Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port3Bit | Port6Bit | Port7Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 810 );


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

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

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

void loop()
{
    ReefAngel.StandardFan( Port1,785,790 );
    ReefAngel.StandardLights( Port3,14,0,22,0 );
    ReefAngel.StandardLights( Port5,6,0,18,0 );
    ReefAngel.StandardLights( Port6,14,0,22,0 );
    ReefAngel.StandardHeater( Port7,780,785 );
    ReefAngel.SingleATO( false,Port8,180,0 );
    ////// Place your custom code below here
    
    
    ////// Place your custom code above here

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

de]
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Multiple Light On Times

Post by cosmith71 »

Specifically, which ports do you want to run at what times? I'm still not sure what you're trying to do.

--Colin
bkc6868
Posts: 95
Joined: Wed Sep 02, 2015 4:39 pm

Re: Multiple Light On Times

Post by bkc6868 »

Port 3 from 10am to 2 pm and again at 6 pm to 10 pm
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Multiple Light On Times

Post by cosmith71 »

Change this line:

Code: Select all

ReefAngel.StandardLights( Port3,14,0,22,0 );
to this:

Code: Select all

ReefAngel.StandardLights( Port3,10,0,22,0 );
if (hour() >=14 && hour() <18) ReefAngel.Relay.Off(Port3);
bkc6868
Posts: 95
Joined: Wed Sep 02, 2015 4:39 pm

Re: Multiple Light On Times

Post by bkc6868 »

Thank you!
Image
Post Reply