First I want to control my fans in the hood by the T1 probe. I placed the probe close to the heat sink. I am using ReefAngel.Standartfan ( Port8, 850, 770) to turn on and off the fans. Fan control works fine, my problem is it also turns off my heater. How can I use the T2 probe for Heater control?
Second question, i don't have an ATO pump yet, I would like to use my switches as an indicator of the water level. I set one of clips to the bottom and the other to the second setting. How can I see the water level on the portal. I would like to see green when both are all the way to the top and when the water level goes down, the first one will turn red and later if I don't add water the second goes red?
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 <ReefAngel.h>
////// Place global variable code below here
/* #define Lights 1
#define Moonlight 2
#define Heater 3
#define Skimmer 4
#define Circulation1 5
#define Circulation2 6
#define Korelia 7
#define Hood Fan 8
*/
////// 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
ReefAngel.AddStandardMenu();
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port8Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port4Bit | Port5Bit | Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T2_PROBE;
InternalMemory.OverheatTemp_write( 840 );
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.MoonLights( Port2 );
ReefAngel.StandardHeater( Port3 );
ReefAngel.WavemakerRandom1( Port5,90,120 );
ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
ReefAngel.StandardFan( Port8,850,770 );
ReefAngel.PWM.SetDaylight( PWMSlope(13,0,22,0,20,55,60,0) );
ReefAngel.PWM.SetActinic( PWMSlope(12,0,23,0,20,45,60,0) );
// LOW Switch
// ReefAngel.SingleATOLow(1);
// HIGH Switch
// ReefAngel.SingleATOHigh(1);
////// Place your custom code below here
////// Place your custom code above here
if (ReefAngel.DisplayedMenu!=FEEDING_MODE || ReefAngel.DisplayedMenu!=WATERCHANGE_MODE)
{
if (hour()>=23 || hour()<7)
{
ReefAngel.RF.UseMemory=false;
ReefAngel.RF.SetMode(Lagoon,10,0);
}
else
{
ReefAngel.RF.UseMemory=true;
}
}
// This should always be the last line
ReefAngel.Portal( "Oceanwolf" );
ReefAngel.ShowInterface();
}