So, I commented out this line:
// ReefAngel.DosingPumpRepeat2( Port8 );
And added:
if (ReefAngel. Params. PH < 835) //my code does not have the extra spaces but it wouldn't let me post otherwise.
ReefAngel.DosingPumpRepeat(Port8,5,60,2);
else
ReefAngel.Relay.Off(Port8);
I kept the dose low for testing. I monitored the system for the rest of the day. nothing seemed suspicious. Luckily, I had less than a quart left in the alk bottle because at around 3am I got a text telling me my pH was over 3.6 and all the alk had been pumped into the sump. Hearty livestock I guess cause nothing died. As I said I'm at a loss. Is there something that gets set up by the wizard that is overriding my modifications? I tried playing with just the ReefAngel.DosingPumpRepeat command, by changing the offset to 0 and running it every minute and it would run, (or not), as expected when I adjusted the pH conditional. So, the format of the code there seems correct. Help!
Here's all of the program. Real newbe here so feel free to comment about any aspect of this program not just my dosing pump problem.
Thanks
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
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port4Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
// 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;
// Ports that are always on
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.ActinicLights( Port1 );
ReefAngel.DayLights( Port2 );
ReefAngel.StandardLights(Port3,18,0,8,0); // Lights on at 6:00pm and off at 8:00am
ReefAngel.Relay.DelayedOn( Port6 );
ReefAngel.DosingPumpRepeat1( Port7 );
// ReefAngel.DosingPumpRepeat2( Port8 );
////// Place your custom code below here
ReefAngel.RF.UseMemory=true;
if (ReefAngel. Params. PH < 850)
ReefAngel.DosingPumpRepeat(Port8,5,60,2);
else
ReefAngel.Relay.Off(Port8);
//Moonlight Phase 6pm-8am (CH3= Daylight CH4=Actinic)
if ( (hour() >=8) && (hour() <18) )
ReefAngel.PWM.SetActinic( (0) );
else
ReefAngel.PWM.SetActinic( MoonPhase() );
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "waucedah_joe","xxxxxxx" );
ReefAngel.ShowInterface();
}