I am testing various options and I am having problems with ReefAngel.StandardLights(Port7) & ReefAngel.MHLights(Port8)
My understanding was that the on/off times set in memory would control ports assigned to that function. Both ports are on all the time and not responding to the settings in memory.
My PDE is:-
Code: Select all
// Autogenerated file by RAGen (v1.1.0.126), (11/13/2011 09:49)
// RA_111311_0949.pde
//
// This version designed for v0.8.5 Beta 17 or later
/* The following features are enabled for this PDE File:
#define DisplayImages
#define WavemakerSetup
#define OverheatSetup
#define DateTimeSetup
#define VersionMenu
#define ATOSetup
#define MetalHalideSetup
#define DirectTempSensor
#define DisplayLEDPWM
#define wifi
#define SingleATOSetup
#define StandardLightSetup
#define SaveRelayState
#define WDT
#define ENABLE_ATO_LOGGING
#define ENABLE_EXCEED_FLAGS
*/
#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>
#include <avr/pgmspace.h>
// Labels for the web banner
prog_char id_label[] PROGMEM = "sebyte";
prog_char probe1_label[] PROGMEM = "Water";
prog_char probe2_label[] PROGMEM = "Room";
prog_char probe3_label[] PROGMEM = "Not%20Used";
prog_char relay1_label[] PROGMEM = "Skimmer";
prog_char relay2_label[] PROGMEM = "ATO";
prog_char relay3_label[] PROGMEM = "Heater";
prog_char relay4_label[] PROGMEM = "Chiller";
prog_char relay5_label[] PROGMEM = "Wave%20Maker";
prog_char relay6_label[] PROGMEM = "Pumps";
prog_char relay7_label[] PROGMEM = "Actinics";
prog_char relay8_label[] PROGMEM = "Daylight";
PROGMEM const char *webbanner_items[] = {
id_label, probe1_label, probe2_label, probe3_label, relay1_label, relay2_label,
relay3_label, relay4_label, relay5_label, relay6_label, relay7_label, relay8_label};
void setup()
{
ReefAngel.Init(); //Initialize controller
// Initialize and start the web banner timer
ReefAngel.LoadWebBanner(pgm_read_word(&(webbanner_items[0])), SIZE(webbanner_items));
ReefAngel.Timer[4].SetInterval(180); // set interval to 180 seconds
ReefAngel.Timer[4].Start();
ReefAngel.FeedingModePorts = B00111001;
ReefAngel.WaterChangePorts = B00111111;
ReefAngel.OverheatShutoffPorts = B11000001;
ReefAngel.LightsOnPorts = B11000000;
// Ports that are always on
ReefAngel.Relay.On(Port1);
ReefAngel.Relay.On(Port6);
}
void loop()
{
// Specific functions
ReefAngel.SingleATOLow(Port2);
ReefAngel.StandardHeater(Port3);
ReefAngel.StandardFan(Port4);
ReefAngel.Wavemaker1(Port5);
ReefAngel.StandardLights(Port7);
ReefAngel.MHLights(Port8);
// Turn lights off if water temperature reaches 85f
if (ReefAngel.Params.Temp1>850) ReefAngel.Relay.Off(Port7);
else ReefAngel.Relay.On(Port7);
if (ReefAngel.Params.Temp1>850) ReefAngel.Relay.Off(Port8);
else ReefAngel.Relay.On(Port8);
// ATO available 6 times per day
if (hour() % 4 == 0) {
ReefAngel.SingleATOLow(Port2);
}
else {
ReefAngel.Relay.Off(Port2);
}
// Web Banner stuff
if(ReefAngel.Timer[4].IsTriggered())
{
ReefAngel.Timer[4].Start();
ReefAngel.WebBanner();
}
ReefAngel.ShowInterface();
}
Here is the memory file in use at present:-
Code: Select all
// Autogenerated file by RAGen (v1.1.0.126), (11/13/2011 09:50)
// Memory_111311_0950.pde
//
// This file sets the default values to the Internal Memory
//
#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <Time.h>
#include <OneWire.h>
#include <Phillips6610LCDInv.h>
#include <avr/pgmspace.h>
#include <ReefAngel_EEPROM.h>
Phillips6610LCDInv e;
void setup()
{
e.lcd_init();
e.lcd_clear(COLOR_WHITE,0,0,132,132);
e.lcd_BacklightOn();
InternalMemory.MHOnHour_write(10);
InternalMemory.MHOnMinute_write(0);
InternalMemory.MHOffHour_write(20);
InternalMemory.MHOffMinute_write(0);
InternalMemory.MHDelay_write(0);
InternalMemory.StdLightsOnHour_write(9);
InternalMemory.StdLightsOnMinute_write(0);
InternalMemory.StdLightsOffHour_write(22);
InternalMemory.StdLightsOffMinute_write(0);
InternalMemory.DP1OnHour_write(20);
InternalMemory.DP1OnMinute_write(0);
InternalMemory.DP2OnHour_write(22);
InternalMemory.DP2OnMinute_write(30);
InternalMemory.DP1Timer_write(10);
InternalMemory.DP2Timer_write(10);
InternalMemory.DP1RepeatInterval_write(60);
InternalMemory.DP2RepeatInterval_write(60);
InternalMemory.ATOTimeout_write(60);
InternalMemory.ATOHighTimeout_write(60);
InternalMemory.ATOHourInterval_write(0);
InternalMemory.ATOHighHourInterval_write(0);
InternalMemory.FeedingTimer_write(900);
InternalMemory.LCDTimer_write(600);
InternalMemory.LEDPWMActinic_write(50);
InternalMemory.LEDPWMDaylight_write(50);
InternalMemory.WM1Timer_write(10);
InternalMemory.WM2Timer_write(354);
InternalMemory.HeaterTempOn_write(780);
InternalMemory.HeaterTempOff_write(790);
InternalMemory.ChillerTempOn_write(805);
InternalMemory.ChillerTempOff_write(795);
InternalMemory.OverheatTemp_write(850);
InternalMemory.PHMax_write(840);
InternalMemory.PHMin_write(550);
}
void loop()
{
// display the values
char buf[128];
sprintf(buf, "MH %2d:%02d-%2d:%02d,%d", InternalMemory.MHOnHour_read(), InternalMemory.MHOnMinute_read(),
InternalMemory.MHOffHour_read(), InternalMemory.MHOffMinute_read(),
InternalMemory.MHDelay_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW, buf);
sprintf(buf, "Std %2d:%02d-%2d:%02d", InternalMemory.StdLightsOnHour_read(), InternalMemory.StdLightsOnMinute_read(),
InternalMemory.StdLightsOffHour_read(), InternalMemory.StdLightsOffMinute_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*2, buf);
sprintf(buf, "LED A: %d%% D: %d%%", InternalMemory.LEDPWMActinic_read(), InternalMemory.LEDPWMDaylight_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*3, buf);
sprintf(buf, "WM1: %ds", InternalMemory.WM1Timer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*4, buf);
sprintf(buf, "WM2: %ds", InternalMemory.WM2Timer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*5, buf);
sprintf(buf, "F: %ds", InternalMemory.FeedingTimer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*6, buf);
sprintf(buf, "S: %ds", InternalMemory.LCDTimer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*7, buf);
sprintf(buf, "H On: %d -> %d", InternalMemory.HeaterTempOn_read(), InternalMemory.HeaterTempOff_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*9, buf);
sprintf(buf, "C On: %d -> %d", InternalMemory.ChillerTempOn_read(), InternalMemory.ChillerTempOff_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*10, buf);
sprintf(buf, "PH %d - %d", InternalMemory.PHMax_read(), InternalMemory.PHMin_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*11, buf);
delay(10000);
e.lcd_clear(COLOR_WHITE,0,0,132,132);
sprintf(buf, "OH: %dF", InternalMemory.OverheatTemp_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW, buf);
sprintf(buf, "ATO L: %ds (%dh)", InternalMemory.ATOTimeout_read(), InternalMemory.ATOHourInterval_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*2, buf);
sprintf(buf, "ATO H: %ds (%dh)", InternalMemory.ATOHighTimeout_read(), InternalMemory.ATOHighHourInterval_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*3, buf);
sprintf(buf, "DP1: %2d:%02d", InternalMemory.DP1OnHour_read(), InternalMemory.DP1OnMinute_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*5, buf);
sprintf(buf, " %ds", InternalMemory.DP1Timer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*6, buf);
sprintf(buf, "DP2: %2d:%02d", InternalMemory.DP2OnHour_read(), InternalMemory.DP2OnMinute_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*7, buf);
sprintf(buf, " %ds", InternalMemory.DP2Timer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*8, buf);
delay(10000);
e.lcd_clear(COLOR_WHITE,0,0,132,132);
}
Thanks