Delay Port restart after feeding/water change
Posted: Sat Apr 16, 2016 7:54 pm
Please let me know how to delay a port restart (if it was ON) after entering feeding/ water change mode.
This is my code, if port 5 was on before feeding/water change, I'd like to delay it for 1 min, until the water level in the sump gets back to normal high. Right now, this command does nothing, no effect: ReefAngel.Relay.DelayedOn( Port5,1 );
Also, I'd like to know how to prevent the lcd from entering a weird blinking loop mode after the wifi module is connected.
#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>q
#include <RF.h>
#include <IO.h>
#include <AI.h>
#include <DCPump.h>
#include <ReefAngel.h>
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
InternalMemory.LCDID_write(255);
InternalMemory.FeedingTimer_write(900);
InternalMemory.LCDTimer_write(600);
InternalMemory.HeaterTempOn_write(760);
InternalMemory.HeaterTempOff_write(780);
InternalMemory.OverheatTemp_write(815);
InternalMemory.IMCheck_write(0xCF06A31E);
ReefAngel.Init(); //Initialize controller
ReefAngel.Use2014Screen();
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port4Bit | Port5Bit |Port7Bit | Port8Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
// Ports that are always on
ReefAngel.Relay.On( Port1 ); // main pump
ReefAngel.Relay.On( Port6 ); // reserved
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.Relay.DelayedOn( Port5,1 );
ReefAngel.StandardLights( Port2,11,0,18,0 ); // wavemaker
ReefAngel.StandardLights( Port3,18,0,22,0 ); //algae farm blue leds
ReefAngel.StandardLights( Port4,20,0,11,0 ); //algae farm red leds
ReefAngel.StandardLights( Port5,11,0,20,0 ); // skimmer
ReefAngel.StandardHeater( Port7,760,780 ); // heater
ReefAngel.StandardLights( Port8,11,0,20,0 ); // circulation pump
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "d0lph1n","****" );
ReefAngel.ShowInterface();
}
This is my code, if port 5 was on before feeding/water change, I'd like to delay it for 1 min, until the water level in the sump gets back to normal high. Right now, this command does nothing, no effect: ReefAngel.Relay.DelayedOn( Port5,1 );
Also, I'd like to know how to prevent the lcd from entering a weird blinking loop mode after the wifi module is connected.
#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>q
#include <RF.h>
#include <IO.h>
#include <AI.h>
#include <DCPump.h>
#include <ReefAngel.h>
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
InternalMemory.LCDID_write(255);
InternalMemory.FeedingTimer_write(900);
InternalMemory.LCDTimer_write(600);
InternalMemory.HeaterTempOn_write(760);
InternalMemory.HeaterTempOff_write(780);
InternalMemory.OverheatTemp_write(815);
InternalMemory.IMCheck_write(0xCF06A31E);
ReefAngel.Init(); //Initialize controller
ReefAngel.Use2014Screen();
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port4Bit | Port5Bit |Port7Bit | Port8Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
// Ports that are always on
ReefAngel.Relay.On( Port1 ); // main pump
ReefAngel.Relay.On( Port6 ); // reserved
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.Relay.DelayedOn( Port5,1 );
ReefAngel.StandardLights( Port2,11,0,18,0 ); // wavemaker
ReefAngel.StandardLights( Port3,18,0,22,0 ); //algae farm blue leds
ReefAngel.StandardLights( Port4,20,0,11,0 ); //algae farm red leds
ReefAngel.StandardLights( Port5,11,0,20,0 ); // skimmer
ReefAngel.StandardHeater( Port7,760,780 ); // heater
ReefAngel.StandardLights( Port8,11,0,20,0 ); // circulation pump
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "d0lph1n","****" );
ReefAngel.ShowInterface();
}