I have two ph probes
Probe 1 (currently installed) is for my main tank reading
Probe 2 is for the CO2 solenoid valve / reactor setup
Probe 2 will switch a plug on/off as per the standard co2 settings on Ragen
I want Probe 1 to also switch off that particular plug if the ph falls below 7.9
How do I do this?
Thanks in advance
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 <ReefAngel.h>
////// Place global variable code below here
////// Place global variable code above here
void DrawCustomMain()
{
// the graph is drawn/updated when we exit the main menu &
// when the parameters are saved
ReefAngel.LCD.DrawDate(6, 64);
ReefAngel.LCD.DrawLargeText(COLOR_DARKTURQUOISE, COLOR_WHITE, 19, 4 , "BOBS REEF");
ReefAngel.LCD.Clear(COLOR_MAROON, 1, 13, 132, 13);
ReefAngel.LCD.Clear(COLOR_MAROON, 10, 75, 119, 75);
ReefAngel.LCD.Clear(COLOR_MAROON, 10, 59, 119, 59);
pingSerial();
ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, COLOR_WHITE, 33, 15, "Tank Water");
char text[7];
ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
pingSerial();
ReefAngel.LCD.DrawHugeText(COLOR_GOLDENROD, DefaultBGColor, 38, 26, text);
ReefAngel.LCD.DrawLargeText(COLOR_MEDIUMSEAGREEN, COLOR_WHITE, 60, 42, "pH");
ConvertNumToString(text, ReefAngel.Params.PH, 100);
ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, 53, 50, text);
pingSerial();
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,84,"ATO");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,94,"N/A");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,104,"CO2");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,114,"N/A");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,84,"Return");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,94,"Vortech");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,104,"N/A");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,114,"Heater");
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawCircleOutletBox(60, 86, TempRelay, true);
}
void DrawCustomGraph()
{
}
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 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( 260 );
// Ports that are always on
ReefAngel.Relay.On( Port1 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.SingleATO( true,Port2,60,0 );
ReefAngel.StandardLights( Port3,4,0,23,0 );
ReefAngel.CO2Control( Port6,752,748 );
ReefAngel.StandardHeater( Port7,250,255 );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Lockes" );
ReefAngel.ShowInterface();
}