Here is my .ino listing.
// ATO build Plus Dosing **********************************
// 14/10/2012
#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 = Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port3Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Ports that are always on
ReefAngel.Relay.On( Port1 ); // Skimmer
ReefAngel.Relay.On( Port6 ); // Pumps
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
// Specific functions that use Internal Memory values
// ReefAngel.SingleATOLow( Port2 );
ReefAngel.SingleATO(true,Port2,600,0);
// true = Low ATO port
// Port1 = port you are using for ATO pump
// 600 = timeout in seconds
// 1 = run only once per hour. To have it run many times per hour, just put 0.
ReefAngel.StandardHeater( Port3 );
ReefAngel.StandardFan( Port4 );
ReefAngel.Wavemaker1( Port5 );
ReefAngel.Wavemaker1(Port5);
ReefAngel.DosingPumpRepeat1( Port7 );
ReefAngel.DosingPumpRepeat2( Port8 );
////// Place your custom code below here
//********************************************************************************************************************************
// Activate Watch Dog Timer at 6am and 6pm
if ((now()%86400)==21600) delay(1000);
if ((now()%86400)==43200) delay(1000);
//********************************************************************************************************************************
// Wavemaker not available 9 pm to 10 am
if ( (hour() >= 20) || (hour() <= 9) )
{
ReefAngel.Relay.Off(Port5);
}
//********************************************************************************************************************************
//LED SETUP
ReefAngel.StandardLights(Port7,10,0,22,0); // Actinic LED Lights on at 10:00am and off at 10:00pm
ReefAngel.StandardLights(Port8,12,0,21,0); // Daylight LED Lights on at 12:00pm and off at 9:00pm
// PWMParabola(byte startHour, byte startMinute, byte endHour, byte endMinute, byte startPWM, byte endPWM, byte oldValue)
// startHour - Hour of the start the slope
// startMinute - Minute of the start the slope
// endHour - Hour of the end of the slope
// endMinute - Minute of the end slope
// startPWM - Beginning PWM value
// endPWM - Ending PWM value
// oldValue - Should be the startPWM value or the existing/current PWM value (ReefAngel.PWM.GetActinicValue() or GetDaylightValue())
ReefAngel.PWM.SetActinic(PWMParabola(10,0,22,0,0,70,0));
// Actinic PWM % starts raising from 0% to 70% and back down to 0% from 10:00am to 10:00pm forming a parabola.
ReefAngel.PWM.SetDaylight(PWMParabola(12,0,21,0,0,60,0));
// Daylight PWM % starts raising from 0% to 60% and back down to 0% from 12:00pm to 9:00pm forming a parabola.
// NOTE light max values reduced due to algae increase. Blue from 100% to 80%, white from 80% to 70% - 26th September 2012
/* NOTES----------------------------------->>>>
If you get a compile error similar to this:
'class ReefAngelClass' has no member named 'PWM'
Please make sure that you enabled Display LED PWM on your features file.
Open RAGen and make sure you have Display LED PWM checked under the Features tab.
Or, you can manually edit the file.
The file is located at "Documents\Arduino\libraries\ReefAngel_Features.h" file and has to include this line in it:
#define DisplayLEDPWM
*/
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "sebyte" );
ReefAngel.ShowInterface();
}
// CODE ENDS //