Additionally, most of my menu functions are not working, such as 8 and 9. They seem to immediately exit back to the main display when I select them.
// Autogenerated file by RAGen (v1.2.2.171), (05/05/2012 12:46)
// RA_050512_1246.ino
//
// This version designed for v0.9.0 or later
/* The following features are enabled for this File:
#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define wifi
#define RelayExp
#define InstalledRelayExpansionModules 0
#define WDT
#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 9
#define CUSTOM_MAIN
#define COLORS_PDE
#define ENABLE_ATO_LOGGING
#define ENABLE_EXCEED_FLAGS
#define IOEXPANSION
#define FONT_8x8
#define FONT_8x16
#define FONT_12x16
#define NUMBERS_8x8
#define NUMBERS_8x16
#define NUMBERS_12x16
#define NUMBERS_16x16
#define CUSTOM_VARIABLES
*/
#include <ReefAngel_Features.h>
#include <RA_Colors.h>
#include <RA_CustomColors.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 <IO.h>
#include <ReefAngel.h>
////// Place global variable code below here
////// Place global variable code above here
#include <avr/pgmspace.h>
prog_char menu1_label[] PROGMEM = "Feeding";
prog_char menu2_label[] PROGMEM = "Water Change";
prog_char menu3_label[] PROGMEM = "ATO Clear";
prog_char menu4_label[] PROGMEM = "Overheat Clear";
prog_char menu5_label[] PROGMEM = "PH Calibration";
prog_char menu6_label[] PROGMEM = "Date / Time";
prog_char menu7_label[] PROGMEM = "Version";
prog_char menu8_label[] PROGMEM = "Turn ON Skimmer";
prog_char menu9_label[] PROGMEM = "Turn Off Skimmer";
// Group the menu entries together
PROGMEM const char *menu_items[] = {
menu1_label, menu2_label, menu3_label,
menu4_label, menu5_label, menu6_label,
menu7_label, menu8_label, menu9_label
};
void MenuEntry1()
{
ReefAngel.FeedingModeStart();
}
void MenuEntry2()
{
ReefAngel.WaterChangeModeStart();
}
void MenuEntry3()
{
ReefAngel.ATOClear();
ReefAngel.DisplayMenuEntry("Clear ATO Timeout");
}
void MenuEntry4()
{
ReefAngel.OverheatClear();
ReefAngel.DisplayMenuEntry("Clear Overheat");
}
void MenuEntry5()
{
ReefAngel.SetupCalibratePH();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry6()
{
ReefAngel.SetupDateTime();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry7()
{
ReefAngel.DisplayVersion();
}
void MenuEntry8()
{
ReefAngel.Relay.On(Box1_Port8);
ReefAngel.Relay.Write();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry9()
{
ReefAngel.Relay.Off(Box1_Port8);
ReefAngel.Relay.Write();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void DrawCustomMain()
{
ReefAngel.LCD.DrawDate(6, 119);
pingSerial();
ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params);
pingSerial();
// draw main relay
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 93, TempRelay);
#ifdef RelayExp
pingSerial();
// draw 1st expansion relay
TempRelay = ReefAngel.Relay.RelayDataE[0];
TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
ReefAngel.LCD.DrawOutletBox(12, 105, TempRelay);
#endif // RelayExp
}
void DrawCustomGraph()
{
// Change the 45 to adjust the horizontal position of the text
ReefAngel.LCD.DrawGraph(5, 5);
}
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
// Initialize the custom menu
ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port8Bit;
ReefAngel.FeedingModePortsE[0] = Port4Bit | Port7Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port4Bit;
ReefAngel.OverheatShutoffPortsE[0] = Port1Bit | Port2Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port4Bit;
ReefAngel.LightsOnPortsE[0] = Port1Bit | Port3Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port2Bit | Port8Bit;
ReefAngel.WaterChangePortsE[0] = Port2Bit | Port8Bit;
// Ports that are always on
ReefAngel.Relay.On(Port3);
ReefAngel.Relay.On(Port8);
ReefAngel.Relay.On(Box1_Port4);
ReefAngel.Relay.On(Box1_Port7);
ReefAngel.Relay.On(Box1_Port8);
////// Place additional initialization code below here
ReefAngel.OverheatProbe = T1_PROBE; // Use Temperature probe 1 to check for overheat
////// Place additional initialization code above here
}
void loop()
{
// Specific functions that use Internal Memory values
ReefAngel.StandardLights(Port1,23,0,2,0); // Moon lights on 23:00-02:00
ReefAngel.StandardHeater(Port2,780,790); // 800w heater on at 78.0, off at 79.0
ReefAngel.MHLights(Port4,14,0,22,0,15); // MH on 14:00-22:00, delay 15m if power fails
ReefAngel.StandardATO(Port5,120); // Standard ATO with 120s timeout
ReefAngel.StandardATO(Port6,120); // Standard ATO with 120s timeout
ReefAngel.StandardLights(Port7,21,0,13,0); // Sump lights on 21:00-13:00
ReefAngel.MHLights(Box1_Port1,14,0,22,0,15); // MH on 14:00-22:00, delay 15m if power fails
ReefAngel.StandardHeater(Box1_Port2,785,790); // 250w heater on at 78.5, off at 79.0
ReefAngel.StandardLights(Box1_Port3,13,0,23,0); // Actinics on 13:00-23:00
ReefAngel.StandardATO(Box1_Port5,120); // Standard ATO with 120s timeout
ReefAngel.DosingPumpRepeat(Box1_Port6,0,480,30); //Dose for 30s every 480m, 0m offset
////// Place your custom code below here
////// Place your custom code above here
// This sends all the data to the portal
// Do not add any custom code that changes any relay status after this line
// The only code after this line should be the ShowInterface function
ReefAngel.Portal("btorrenga");
// This should always be the last line
ReefAngel.ShowInterface();
}