Code: Select all
// Autogenerated file by RAGen (v1.0.4.92), (09/09/2011 09:18)
// RA_090911_0918.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define DisplayImages
#define WavemakerSetup
#define DateTimeSetup
#define VersionMenu
#define ATOSetup
#define MetalHalideSetup
#define DirectTempSensor
#define DisplayLEDPWM
#define StandardLightSetup
*/
#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>
void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.FeedingModePorts = B00001100;
ReefAngel.WaterChangePorts = B00001100;
ReefAngel.OverheatShutoffPorts = B00011111;
ReefAngel.LightsOnPorts = B00000011;
// Ports that are always on
ReefAngel.Relay.On(Port8);
// Random value from 60seconds to whatever is stored in internal memory
ReefAngel.Timer[1].SetInterval(random(5, InternalMemory.WM1Timer_read()));
ReefAngel.Timer[1].Start();
ReefAngel.Relay.On(Port3);
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.MHLights(Port1);
ReefAngel.StandardLights(Port2);
if ( ReefAngel.Timer[1].IsTriggered() )
{
// Random value from 60seconds to whatever is stored in internal memory
ReefAngel.Timer[1].SetInterval(random(5, InternalMemory.WM1Timer_read()));
ReefAngel.Timer[1].Start();
ReefAngel.Relay.Toggle(Port3);
ReefAngel.Relay.Toggle(Port4);
}
ReefAngel.StandardHeater(Port5);
ReefAngel.StandardFan(Port6);
ReefAngel.StandardATO(Port7);
}