Below is the current errors that I am receiving when I try to build this sketch using Lib ver 16 and Arudino software 22.
This sketch is a combination of a sketch generator by Ragen and the PWM commands and relay labels from my old sketch that was created using Lib ver 14. I just kept adding until the sketch would not compile any further and here is where I'm stuck. I did compile and load this sketch before I added the WiFi feature, and it did load and even turned on my PWM channels but the Controller has a blank display which is soild white.
After I get this sketch working I planned to move on to Client 2.2 upgrade
libraries\ReefAngel\ReefAngel.cpp: In member function ' void ReefAngelClass::InitMenus()':
libraries\ReefAngel\ReefAngel.cpp
libraries\ReefAngel\ReefAngel.cpp
libraries\ReefAngel\ReefAngel.cpp
// Autogenerated file by RAGen (v1.0.4.92), (08/24/2011 17:30)
// Memory_082411_1730.pde
//
// This file sets the default values to the Internal Memory
//
/* The following features are enabled for this PDE File:
#define DirectTempSensor
#define wifi
#define StandardLightSetup
#define Simple_menu
*/
#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <DS1307RTC.h>
#include <Time.h>
#include <OneWire.h>
#include <Phillips6610LCDInv.h>
#include <avr/pgmspace.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <Wire.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
Phillips6610LCDInv e;
/*
----------------------------------------------------------------------------------------------------------------------------------------------------------
Give labels to your PWM channels
----------------------------------------------------------------------------------------------------------------------------------------------------------
*/
#define WhitePWM1 0
#define BluePWM1 1
#define WhitePWM2 2
#define BluePWM2 3
#define WhitePWM3 4
#define BluePWM3 5
byte PWMChannel[]={
0,0,0,0,0,0};
// Labels for the web banner
#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "divingdon";
prog_char probe1_label[] PROGMEM = "Water";
prog_char probe2_label[] PROGMEM = "Room";
prog_char probe3_label[] PROGMEM = "LED's";
prog_char relay1_label[] PROGMEM = "Sump";
prog_char relay2_label[] PROGMEM = "Ca%20Reactor";
prog_char relay3_label[] PROGMEM = "Skimmer";
prog_char relay4_label[] PROGMEM = "Chiller";
prog_char relay5_label[] PROGMEM = "Heater";
prog_char relay6_label[] PROGMEM = "Heater";
prog_char relay7_label[] PROGMEM = "PWM%20Supply";
prog_char relay8_label[] PROGMEM = "Red%20LED's";
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()
{
e.lcd_init();
e.lcd_clear(COLOR_WHITE,0,0,132,132);
e.lcd_BacklightOn();
InternalMemory.MHOnHour_write(8);
InternalMemory.MHOnMinute_write(0);
InternalMemory.MHOffHour_write(15);
InternalMemory.MHOffMinute_write(0);
InternalMemory.MHDelay_write(5);
InternalMemory.StdLightsOnHour_write(8);
InternalMemory.StdLightsOnMinute_write(0);
InternalMemory.StdLightsOffHour_write(15);
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(200);
InternalMemory.WM2Timer_write(354);
InternalMemory.HeaterTempOn_write(780);
InternalMemory.HeaterTempOff_write(791);
InternalMemory.ChillerTempOn_write(810);
InternalMemory.ChillerTempOff_write(785);
InternalMemory.OverheatTemp_write(1500);
InternalMemory.PHMax_write(840);
InternalMemory.PHMin_write(550);
}
void loop()
{
// ReefAngel.ShowInterface();
// 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);
// Setup relay 7 to turn on at 06:00aM and off at 10:15AM
ReefAngel.StandardLights(7,06,0,22,15);
ReefAngel.Relay.Write(); //Writes the value of RelayData to the RelayBox
// Setup relay 8 to turn on at 18:00PM and off at 00:00AM
ReefAngel.StandardLights(8,18,0,00,00);
ReefAngel.Relay.Write(); //Writes the value of RelayData to the RelayBox
//This section calculates the slope
PWMChannel[WhitePWM1]=2.55*PWMSlope(06,45,21,00,0,30,60,PWMChannel[WhitePWM1]); // calculate slope for 0 to 50% starting at 12:30pm with duration of 60min, then from 50% to 0 from 17:00pm with duration of 60min
PWMChannel[BluePWM1]=2.55*PWMSlope(06,45,21,15,0,35,60,PWMChannel[BluePWM1]);
PWMChannel[WhitePWM2]=2.55*PWMSlope(06,46,21,00,0,30,60,PWMChannel[WhitePWM2]);
PWMChannel[BluePWM2]=2.55*PWMSlope(06,46,22,15,0,35,60,PWMChannel[BluePWM2]);
PWMChannel[WhitePWM3]=2.55*PWMSlope(06,47,21,00,0,30,60,PWMChannel[WhitePWM3]);
PWMChannel[BluePWM3]=2.55*PWMSlope(06,47,21,15,0,35,60, PWMChannel[BluePWM3]);
// this section sends the data to the PWM expansion module
PWMExpansion(WhitePWM1,PWMChannel[WhitePWM1]);
PWMExpansion(BluePWM1,PWMChannel[BluePWM1]);
PWMExpansion(WhitePWM2,PWMChannel[WhitePWM2]);
PWMExpansion(BluePWM2,PWMChannel[BluePWM2]);
PWMExpansion(WhitePWM3,PWMChannel[WhitePWM3]);
PWMExpansion(BluePWM3,PWMChannel[BluePWM3]);
}
void PWMExpansion(byte cmd, byte data)
{
Wire.beginTransmission(2); // transmit to device #2
Wire.send('$'); // sends $
Wire.send('$'); // sends $
Wire.send('$'); // sends $
Wire.send(cmd); // sends a value
Wire.send(data); // sends 255
Wire.endTransmission(); // stop transmitting}
}