Of course the room temp probe (the shortest one) ended up at T1, which I modified the following code per another post I saw
Code: Select all
ReefAngel.StandardHeater(T3_PROBE, Port7 ,InternalMemory.HeaterTempOn_read(), InternalMemory.HeaterTempOff_read());
I have stripped out a lot of code I was using, any thoughts why this is occurring?
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 <PAR.h>
#include <ReefAngel.h>
////// Place global variable code below here
boolean RST;
byte DCPSpeed = 100;
////// 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 = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port4Bit | Port6Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T3_PROBE;
ReefAngel.OverheatProbe = T3_PROBE;
// Feeeding and Water Change mode speed
//ReefAngel.DCPump.FeedingSpeed=0;
//ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port3 ); //VarioS8
////// Place additional initialization code below here
// initialize default values for Custom Variables
//ReefAngel.CustomVar[4]=100; //speed
//initialize reset flag to true for calculations
RST = true;
////// Place additional initialization code above here
}
void loop(){
//Alkalinity Drip // Currently set to 8 sec every 240 minutes = 36 ml/day (1/15/18) was 31.5
if (ReefAngel.Params.PH < 840) {
ReefAngel.DosingPumpRepeat(Port1, 15,
InternalMemory.DP1RepeatInterval_read(),
InternalMemory.DP1Timer_read());
}
//Calcium Drip // Currently set to 7 sec every 240 minutes = 31.5 ml/day (1/15/18) was 27
ReefAngel.DosingPumpRepeat(Port2, 45,
InternalMemory.DP2RepeatInterval_read(),
InternalMemory.DP2Timer_read());
ReefAngel.Relay.DelayedOn( Port4 ); //Reef Octopus Skimmer
//ReefAngel.StandardHeater( Port7 ); //Ehiem 150W Heater
ReefAngel.StandardHeater(T3_PROBE, Port7 ,InternalMemory.HeaterTempOn_read(), InternalMemory.HeaterTempOff_read());
ReefAngel.StandardATO( Port8 ); //MAXI Jet 600 ATO Pump
ReefAngel.PWM.Channel1PWMSlope(); //Right & Left Philips Rebel ES Royal Blue and Cool White & UV & Cree XT-E Green
ReefAngel.PWM.Channel2PWMSlope(); //Right Daylight Cree XP-G2 R5 Cool White
ReefAngel.PWM.Channel3PWMSlope(); //Right Actinic Cree XT-E Royal Blue
ReefAngel.PWM.Channel4PWMSlope(); //Left Daylight Cree XP-G2 R5 Cool White
ReefAngel.PWM.Channel5PWMSlope(); //Left Actinic Cree XT-E Royal Blue
////// Place your custom code below here
//PWM Expansion Channels = 0 if Overheat or Lights off
if ((hour()>=InternalMemory.StdLightsOffHour_read() || hour()<=InternalMemory.StdLightsOnHour_read()) || (ReefAngel.Params.Temp[T3_PROBE]>InternalMemory.OverheatTemp_read())) {
ReefAngel.PWM.SetChannel (1,0);
ReefAngel.PWM.SetChannel (2,0);
ReefAngel.PWM.SetChannel (3,0);
ReefAngel.PWM.SetChannel (4,0);
ReefAngel.PWM.SetChannel (5,0);
}
//Fuge Light on 1 hour before sunset hour and off 1 hour after sunrise hour
if (hour()>=((InternalMemory.StdLightsOffHour_read()-1) || hour()<=(InternalMemory.StdLightsOnHour_read()+1))) ReefAngel.Relay.On(Port6);
else ReefAngel.Relay.Off(Port6);
// moonlight are on between sunset hour and sunrise hour
if (hour()>=((InternalMemory.StdLightsOffHour_read()-1) || hour()<=InternalMemory.StdLightsOnHour_read())) ReefAngel.PWM.SetChannel (0, (map(MoonPhase(), 0,100,10,25)));
else ReefAngel.PWM.SetChannel (0,0);
//Start Feeding Mode at 17:00 (hour*60*60)
//if ( (now()%86400==61200) /*|| (now()%86400==39600) */) ReefAngel.FeedingModeStart();
//LED fans
if (hour()<InternalMemory.StdLightsOnHour_read() || hour()>(InternalMemory.StdLightsOffHour_read()+1)) ReefAngel.Relay.Off(Port5);
else ReefAngel.Relay.On(Port5);
//DC Pump Speed Normal
ReefAngel.PWM.SetActinic( DCPSpeed );
//Custom Variables and Calculations for Dosing and Lighting Durations
if (RST == true) {
//if ( (now()%86400==3600) || RST == true ) {
//ReefAngel.PWM.SetActinic ( ReefAngel.CustomVar[4] );
int DailyAlk = ((InternalMemory.DP1Timer_read() * (.75)) * (1440 / InternalMemory.DP1RepeatInterval_read())); //Alk ml/day
int DailyCalc = ((InternalMemory.DP2Timer_read() * (.75)) * (1440 / InternalMemory.DP2RepeatInterval_read())); //Calc ml/day
if (DailyAlk!=ReefAngel.CustomVar[0]) ReefAngel.CustomVar[0]=DailyAlk;
if (DailyCalc!=ReefAngel.CustomVar[1]) ReefAngel.CustomVar[1]=DailyCalc;
RST = false;
}
//assignmenets are = and comparisons are ==
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "clw143" );
ReefAngel.ShowInterface();
}