Page 1 of 1

Changes To Moonlights

Posted: Sun Mar 24, 2013 3:10 pm
by gomer23
I updated to the 1.03 libraries today and used the Reef Angel Wizard to generate the code. This time I did the internal memory method so I could change more options with my Android device. But during the wizard I couldn't set a custom time for my Moonlights on Port 2. I usually have these come on at 9pm and shut off at 12am. How can I change this code to make this change. Thank you!

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 <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
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port3Bit | Port5Bit | Port7Bit | Port8Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port6Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;


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

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

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

void loop()
{
    ReefAngel.DayLights( Port1 );
    ReefAngel.MoonLights( Port2 );
    ReefAngel.StandardHeater( Port6 );
    ReefAngel.StandardATO( Port7 );
    ReefAngel.PWM.DaylightPWMSlope();
    ReefAngel.PWM.ActinicPWMSlope();
    ////// Place your custom code below here
    

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

    // This should always be the last line
    ReefAngel.Portal( "gomer23" );
    ReefAngel.ShowInterface();
}


Re: Changes To Moonlights

Posted: Sun Mar 24, 2013 3:54 pm
by rimai
Replace this:

Code: Select all

    ReefAngel.MoonLights( Port2 );
With this:

Code: Select all

    ReefAngel.StandardLights(Port2,21,0,0,0);

Re: Changes To Moonlights

Posted: Sun Mar 24, 2013 4:32 pm
by gomer23
Dang, was about to do that too, I should have just made that change. Thanks for the help!