I am trying to turn the ATO pump on at 48% and off above 50%.
ATO = Sensor 4
Relay = Box1_Port7
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
////// 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.AddSalinityExpansion(); // Salinity Expansion Module
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port5Bit;
ReefAngel.FeedingModePortsE[0] = Port1Bit | Port7Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port5Bit;
ReefAngel.WaterChangePortsE[0] = Port1Bit | Port7Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
ReefAngel.LightsOnPortsE[0] = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
ReefAngel.OverheatShutoffPortsE[0] = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 850 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port8 );
ReefAngel.Relay.On( Box1_Port5 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardHeater( Port7,750,755 );
ReefAngel.Relay.DelayedOn( Box1_Port1,10 );
ReefAngel.StandardLights( Box1_Port3,20,0,8,0 );
//ReefAngel.WaterLevelATO(4)(Box1_Port7,60,48,51 );
ReefAngel.RF.UseMemory = false;
ReefAngel.RF.SetMode( Constant,30,10 );
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( Constant,50,10 );
ReefAngel.DCPump.DaylightChannel = None;
ReefAngel.DCPump.ActinicChannel = None;
ReefAngel.DCPump.ExpansionChannel[0] = None;
ReefAngel.DCPump.ExpansionChannel[1] = None;
ReefAngel.DCPump.ExpansionChannel[2] = None;
ReefAngel.DCPump.ExpansionChannel[3] = None;
ReefAngel.DCPump.ExpansionChannel[4] = None;
ReefAngel.DCPump.ExpansionChannel[5] = None;
////// Place your custom code below here
if (ReefAngel.WaterLevel.GetLevel(4)<=48) ReefAngel.Relay.On(Box1_Port7);
if (ReefAngel.WaterLevel.GetLevel(4)>=50) ReefAngel.Relay.Off(Box1_Port7);
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Paul_Velasco" );
ReefAngel.ShowInterface();
}
Error:
sketch_mar16a.cpp: In function 'void loop()':
sketch_mar16a:103: error: 'class ReefAngelClass' has no member named 'WaterLevel'
sketch_mar16a:104: error: 'class ReefAngelClass' has no member named 'WaterLevel'
Oh yeah water levels to not show same on Portal and LCD Screen? I get 50 and 50 on LCD for Portal the numbers are way off???