here is my PDE i think i am close :D
here is my PDE i think i am close :D
// Autogenerated file by RAGen (v1.0.4.92), (10/01/2011 23:36)
// RA_100111_2336.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define SIMPLE_MENU
#define DisplayLEDPWM
#define wifi
#define RelayExp
*/
#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>
// Labels for the web banner
#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "67_kevin";
prog_char probe1_label[] PROGMEM = "Water";
prog_char probe2_label[] PROGMEM = "Room";
prog_char probe3_label[] PROGMEM = "Lights";
prog_char relay1_label[] PROGMEM = "Day";
prog_char relay2_label[] PROGMEM = "Day";
prog_char relay3_label[] PROGMEM = "Day";
prog_char relay4_label[] PROGMEM = "Actinic";
prog_char relay5_label[] PROGMEM = "Actinic";
prog_char relay6_label[] PROGMEM = "Actinic";
prog_char relay7_label[] PROGMEM = "Hood Fan";
prog_char relay8_label[] PROGMEM = "Light Fan";
prog_char relay9_label[] PROGMEM = "Skimmer";
prog_char relay10_label[] PROGMEM = "Sump";
prog_char relay11_label[] PROGMEM = "CO2";
prog_char relay12_label[] PROGMEM = "Vortech";
prog_char relay13_label[] PROGMEM = "Vortech";
prog_char relay14_label[] PROGMEM = "Vortech";
prog_char relay15_label[] PROGMEM = "Return";
prog_char relay16_label[] PROGMEM = "extra";
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, relay9_label
, relay10_label, relay11_label, relay12_label, relay13_label, relay14_label, relay15_label, relay16_label};
void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit(0);
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
// 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 = B00000000;
ReefAngel.WaterChangePorts = B00000000;
ReefAngel.OverheatShutoffPorts = B00000000;
ReefAngel.LightsOnPorts = B00111111;
// Ports that are always on
ReefAngel.Relay.On(Box1_Port1);
ReefAngel.Relay.On(Box1_Port2);
ReefAngel.Relay.On(Box1_Port3);
ReefAngel.Relay.On(Box1_Port4);
ReefAngel.Relay.On(Box1_Port5);
ReefAngel.Relay.On(Box1_Port6);
ReefAngel.Relay.On(Box1_Port7);
ReefAngel.Relay.On(Box1_Port8);
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardLights(Port1,8,0,21,0);
ReefAngel.StandardLights(Port2,8,0,21,0);
ReefAngel.StandardLights(Port3,8,0,21,0);
ReefAngel.StandardLights(Port4,7,0,22,0);
ReefAngel.StandardLights(Port5,7,0,22,0);
ReefAngel.StandardLights(Port6,7,0,22,0);
ReefAngel.StandardFan(Port7);
ReefAngel.StandardFan(Port8);
// Web Banner stuff
if(ReefAngel.Timer[4].IsTriggered())
{
ReefAngel.Timer[4].Start();
ReefAngel.WebBanner();
}
}
i know i am missing things and probably have things i dont need. i copy and pasted if you couldnt figure that out. all i need is PWM for my LED, and fan control the rest is pretty much left on but i want to do the web banner stuff and have it email me when something is wrong. can you guys check this out and tell me what i need to drop to make it smaller. it says its too big. 35160 bytes
// RA_100111_2336.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define SIMPLE_MENU
#define DisplayLEDPWM
#define wifi
#define RelayExp
*/
#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>
// Labels for the web banner
#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "67_kevin";
prog_char probe1_label[] PROGMEM = "Water";
prog_char probe2_label[] PROGMEM = "Room";
prog_char probe3_label[] PROGMEM = "Lights";
prog_char relay1_label[] PROGMEM = "Day";
prog_char relay2_label[] PROGMEM = "Day";
prog_char relay3_label[] PROGMEM = "Day";
prog_char relay4_label[] PROGMEM = "Actinic";
prog_char relay5_label[] PROGMEM = "Actinic";
prog_char relay6_label[] PROGMEM = "Actinic";
prog_char relay7_label[] PROGMEM = "Hood Fan";
prog_char relay8_label[] PROGMEM = "Light Fan";
prog_char relay9_label[] PROGMEM = "Skimmer";
prog_char relay10_label[] PROGMEM = "Sump";
prog_char relay11_label[] PROGMEM = "CO2";
prog_char relay12_label[] PROGMEM = "Vortech";
prog_char relay13_label[] PROGMEM = "Vortech";
prog_char relay14_label[] PROGMEM = "Vortech";
prog_char relay15_label[] PROGMEM = "Return";
prog_char relay16_label[] PROGMEM = "extra";
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, relay9_label
, relay10_label, relay11_label, relay12_label, relay13_label, relay14_label, relay15_label, relay16_label};
void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit(0);
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
// 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 = B00000000;
ReefAngel.WaterChangePorts = B00000000;
ReefAngel.OverheatShutoffPorts = B00000000;
ReefAngel.LightsOnPorts = B00111111;
// Ports that are always on
ReefAngel.Relay.On(Box1_Port1);
ReefAngel.Relay.On(Box1_Port2);
ReefAngel.Relay.On(Box1_Port3);
ReefAngel.Relay.On(Box1_Port4);
ReefAngel.Relay.On(Box1_Port5);
ReefAngel.Relay.On(Box1_Port6);
ReefAngel.Relay.On(Box1_Port7);
ReefAngel.Relay.On(Box1_Port8);
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardLights(Port1,8,0,21,0);
ReefAngel.StandardLights(Port2,8,0,21,0);
ReefAngel.StandardLights(Port3,8,0,21,0);
ReefAngel.StandardLights(Port4,7,0,22,0);
ReefAngel.StandardLights(Port5,7,0,22,0);
ReefAngel.StandardLights(Port6,7,0,22,0);
ReefAngel.StandardFan(Port7);
ReefAngel.StandardFan(Port8);
// Web Banner stuff
if(ReefAngel.Timer[4].IsTriggered())
{
ReefAngel.Timer[4].Start();
ReefAngel.WebBanner();
}
}
i know i am missing things and probably have things i dont need. i copy and pasted if you couldnt figure that out. all i need is PWM for my LED, and fan control the rest is pretty much left on but i want to do the web banner stuff and have it email me when something is wrong. can you guys check this out and tell me what i need to drop to make it smaller. it says its too big. 35160 bytes
Re: here is my PDE i think i am close :D
If you say you are configured to use this PDE, then you should not have a problem. I just tested it with 0.8.5.18 and the code size is only 28570.
What you need to do is this:
1. Confirm your libraries are 0.8.5.18 - use the wifi update utility to do this
2. Open up your ReefAngel_Features.h file and make sure the file contains only this:
Just copy this code and paste it in.
The libraries folder is usually located in the following folder:
Windows XP - My Documents\Arduino\libraries
Windows Vista or 7 - Documents\Arduino\libraries
Linux - ~/.arduino/libraries
OS X - ~/Documents/Arduino/libraries
You need to open it up inside your File Explorer. Inside that folder, you will
see lots of folders that begin with the ReefAngel prefix. You need to find (and open) the folder called
ReefAngel_Features. Inside that folder, there is another file called ReefAngel_Features.h. You need to open
up that file inside your favorite text editor and replace the contents of it with what's listed above.
What it sounds like is that something isn't set right with your Features file causing it to increase your file size.
curt
What you need to do is this:
1. Confirm your libraries are 0.8.5.18 - use the wifi update utility to do this
2. Open up your ReefAngel_Features.h file and make sure the file contains only this:
Code: Select all
#ifdef __REEFANGEL_FEATURES_H__
#define SIMPLE_MENU
#define DisplayLEDPWM
#define wifi
#define RelayExp
#define InstalledRelayExpansionModules 1
#endif // __REEFANGEL_FEATURES_H__
The libraries folder is usually located in the following folder:
Windows XP - My Documents\Arduino\libraries
Windows Vista or 7 - Documents\Arduino\libraries
Linux - ~/.arduino/libraries
OS X - ~/Documents/Arduino/libraries
You need to open it up inside your File Explorer. Inside that folder, you will
see lots of folders that begin with the ReefAngel prefix. You need to find (and open) the folder called
ReefAngel_Features. Inside that folder, there is another file called ReefAngel_Features.h. You need to open
up that file inside your favorite text editor and replace the contents of it with what's listed above.
What it sounds like is that something isn't set right with your Features file causing it to increase your file size.
curt
Re: here is my PDE i think i am close :D
After more research I believe that my lights will just come on with this code, and not simulate sunrise and sunset. Am I correct in assuming that?
Re: here is my PDE i think i am close :D
OK. Off to the tutorials to get that code. Thanks
Re: here is my PDE i think i am close :D
ok this is what i have now but i keep getting a error:
sketch_oct04a.cpp: in function 'void setup()':
sketch_oct04a:71: error: 'class ReefAngelclass' has no member named 'loadwebbanner'
sketch_oct04a:74:error: expected ';' before 'reefangel'
sketch_oct04a.cpp: in function 'void loop()
sketch_oct04a:106: error 'class reefangelclass' has no member named 'PWM'
sketch_oct04a:106: error 'class reefangelclass' has no member named 'PWM'
sketch_oct04a:107: error 'class reefangelclass' has no member named 'PWM'
sketch_oct04a:107: error 'class reefangelclass' has no member named 'PWM'
sketch_oct04a:113: error 'class reefangelclass' has o member named 'WebBanner'
here is PDE code:
// Autogenerated file by RAGen (v1.0.4.92), (10/01/2011 23:36)
// RA_100111_2336.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define SIMPLE_MENU
#define DisplayLEDPWM
#define wifi
#define RelayExp
*/
#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>
// Labels for the web banner
#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "67_kevin";
prog_char probe1_label[] PROGMEM = "Water";
prog_char probe2_label[] PROGMEM = "Room";
prog_char probe3_label[] PROGMEM = "Lights";
prog_char relay1_label[] PROGMEM = "Day";
prog_char relay2_label[] PROGMEM = "Day";
prog_char relay3_label[] PROGMEM = "Day";
prog_char relay4_label[] PROGMEM = "Actinic";
prog_char relay5_label[] PROGMEM = "Actinic";
prog_char relay6_label[] PROGMEM = "Actinic";
prog_char relay7_label[] PROGMEM = "Hood Fan";
prog_char relay8_label[] PROGMEM = "Light Fan";
prog_char relay9_label[] PROGMEM = "Skimmer";
prog_char relay10_label[] PROGMEM = "Sump";
prog_char relay11_label[] PROGMEM = "CO2";
prog_char relay12_label[] PROGMEM = "Vortech";
prog_char relay13_label[] PROGMEM = "Vortech";
prog_char relay14_label[] PROGMEM = "Vortech";
prog_char relay15_label[] PROGMEM = "Return";
prog_char relay16_label[] PROGMEM = "extra";
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,
relay9_label, relay10_label, relay11_label, relay12_label, relay13_label, relay14_label, relay15_label, relay16_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))
// Initialize and start the timer;
ReefAngel.Timer[4].SetInterval(180); // set interval to 180 seconds
ReefAngel.Timer[4].Start();
// Ports that are always on
ReefAngel.Relay.On(Box1_Port1);
ReefAngel.Relay.On(Box1_Port2);
ReefAngel.Relay.On(Box1_Port3);
ReefAngel.Relay.On(Box1_Port4);
ReefAngel.Relay.On(Box1_Port5);
ReefAngel.Relay.On(Box1_Port6);
ReefAngel.Relay.On(Box1_Port7);
ReefAngel.Relay.On(Box1_Port8);
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardLights(Port1,8,0,21,0);
ReefAngel.StandardLights(Port2,8,0,21,0);
ReefAngel.StandardLights(Port3,8,0,21,0);
ReefAngel.StandardLights(Port4,7,0,22,0);
ReefAngel.StandardLights(Port5,7,0,22,0);
ReefAngel.StandardLights(Port6,7,0,22,0);
ReefAngel.StandardFan(Port7);
ReefAngel.StandardFan(Port8);
// Have PWM on from 7a to 10p, with gradual 60 minute ramp up and down starting at the given times
// From 7a to 8a, the PWM will slowly ramp from 0% to 100%
// From 9p to 10p, the PWM will slowly ramp from 100% to 0%
ReefAngel.PWM.SetActinic(PWMSlope(7,0,22,0,0,100,60,ReefAngel.PWM.GetActinicValue()));
ReefAngel.PWM.SetDaylight(PWMSlope(8,0,21,0,0,100,60,ReefAngel.PWM.GetDaylightValue()));
// Web Banner stuff
if(ReefAngel.Timer[4].IsTriggered())
{
ReefAngel.Timer[4].Start();
ReefAngel.WebBanner();
}
}
and here is REEFANGEL_FEATURES.H
#ifdef __REEFANGEL_FEATURES_H__
#define SIMPLE_MENU
#define DisplayLEDPWM
#define wifi
#define RelayExp
#define InstalledRelayExpansionModules 1
#endif // __REEFANGEL_FEATURES_H__
here is memory file ( in sure it is jacked up )
oops dont have one of those files i have the folder but its empty
is there anything else i need to provide??
sketch_oct04a.cpp: in function 'void setup()':
sketch_oct04a:71: error: 'class ReefAngelclass' has no member named 'loadwebbanner'
sketch_oct04a:74:error: expected ';' before 'reefangel'
sketch_oct04a.cpp: in function 'void loop()
sketch_oct04a:106: error 'class reefangelclass' has no member named 'PWM'
sketch_oct04a:106: error 'class reefangelclass' has no member named 'PWM'
sketch_oct04a:107: error 'class reefangelclass' has no member named 'PWM'
sketch_oct04a:107: error 'class reefangelclass' has no member named 'PWM'
sketch_oct04a:113: error 'class reefangelclass' has o member named 'WebBanner'
here is PDE code:
// Autogenerated file by RAGen (v1.0.4.92), (10/01/2011 23:36)
// RA_100111_2336.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define SIMPLE_MENU
#define DisplayLEDPWM
#define wifi
#define RelayExp
*/
#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>
// Labels for the web banner
#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "67_kevin";
prog_char probe1_label[] PROGMEM = "Water";
prog_char probe2_label[] PROGMEM = "Room";
prog_char probe3_label[] PROGMEM = "Lights";
prog_char relay1_label[] PROGMEM = "Day";
prog_char relay2_label[] PROGMEM = "Day";
prog_char relay3_label[] PROGMEM = "Day";
prog_char relay4_label[] PROGMEM = "Actinic";
prog_char relay5_label[] PROGMEM = "Actinic";
prog_char relay6_label[] PROGMEM = "Actinic";
prog_char relay7_label[] PROGMEM = "Hood Fan";
prog_char relay8_label[] PROGMEM = "Light Fan";
prog_char relay9_label[] PROGMEM = "Skimmer";
prog_char relay10_label[] PROGMEM = "Sump";
prog_char relay11_label[] PROGMEM = "CO2";
prog_char relay12_label[] PROGMEM = "Vortech";
prog_char relay13_label[] PROGMEM = "Vortech";
prog_char relay14_label[] PROGMEM = "Vortech";
prog_char relay15_label[] PROGMEM = "Return";
prog_char relay16_label[] PROGMEM = "extra";
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,
relay9_label, relay10_label, relay11_label, relay12_label, relay13_label, relay14_label, relay15_label, relay16_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))
// Initialize and start the timer;
ReefAngel.Timer[4].SetInterval(180); // set interval to 180 seconds
ReefAngel.Timer[4].Start();
// Ports that are always on
ReefAngel.Relay.On(Box1_Port1);
ReefAngel.Relay.On(Box1_Port2);
ReefAngel.Relay.On(Box1_Port3);
ReefAngel.Relay.On(Box1_Port4);
ReefAngel.Relay.On(Box1_Port5);
ReefAngel.Relay.On(Box1_Port6);
ReefAngel.Relay.On(Box1_Port7);
ReefAngel.Relay.On(Box1_Port8);
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardLights(Port1,8,0,21,0);
ReefAngel.StandardLights(Port2,8,0,21,0);
ReefAngel.StandardLights(Port3,8,0,21,0);
ReefAngel.StandardLights(Port4,7,0,22,0);
ReefAngel.StandardLights(Port5,7,0,22,0);
ReefAngel.StandardLights(Port6,7,0,22,0);
ReefAngel.StandardFan(Port7);
ReefAngel.StandardFan(Port8);
// Have PWM on from 7a to 10p, with gradual 60 minute ramp up and down starting at the given times
// From 7a to 8a, the PWM will slowly ramp from 0% to 100%
// From 9p to 10p, the PWM will slowly ramp from 100% to 0%
ReefAngel.PWM.SetActinic(PWMSlope(7,0,22,0,0,100,60,ReefAngel.PWM.GetActinicValue()));
ReefAngel.PWM.SetDaylight(PWMSlope(8,0,21,0,0,100,60,ReefAngel.PWM.GetDaylightValue()));
// Web Banner stuff
if(ReefAngel.Timer[4].IsTriggered())
{
ReefAngel.Timer[4].Start();
ReefAngel.WebBanner();
}
}
and here is REEFANGEL_FEATURES.H
#ifdef __REEFANGEL_FEATURES_H__
#define SIMPLE_MENU
#define DisplayLEDPWM
#define wifi
#define RelayExp
#define InstalledRelayExpansionModules 1
#endif // __REEFANGEL_FEATURES_H__
here is memory file ( in sure it is jacked up )
oops dont have one of those files i have the folder but its empty
is there anything else i need to provide??
did all of this and tried to add the web banner feature, ummm i dont think it worked LOLbinder wrote:If you say you are configured to use this PDE, then you should not have a problem. I just tested it with 0.8.5.18 and the code size is only 28570.
What you need to do is this:
1. Confirm your libraries are 0.8.5.18 - use the wifi update utility to do this
2. Open up your ReefAngel_Features.h file and make sure the file contains only this:Just copy this code and paste it in.Code: Select all
#ifdef __REEFANGEL_FEATURES_H__ #define SIMPLE_MENU #define DisplayLEDPWM #define wifi #define RelayExp #define InstalledRelayExpansionModules 1 #endif // __REEFANGEL_FEATURES_H__
The libraries folder is usually located in the following folder:
Windows XP - My Documents\Arduino\libraries
Windows Vista or 7 - Documents\Arduino\libraries
Linux - ~/.arduino/libraries
OS X - ~/Documents/Arduino/libraries
You need to open it up inside your File Explorer. Inside that folder, you will
see lots of folders that begin with the ReefAngel prefix. You need to find (and open) the folder called
ReefAngel_Features. Inside that folder, there is another file called ReefAngel_Features.h. You need to open
up that file inside your favorite text editor and replace the contents of it with what's listed above.
What it sounds like is that something isn't set right with your Features file causing it to increase your file size.
curt
Re: here is my PDE i think i am close :D
you are missing a ; at the end of the second line. What I just pasted up there should be:ReefAngel.Init(); //Initialize controller
// Initialize and start the web banner timer
ReefAngel.LoadWebBanner(pgm_read_word(&(webbanner_items[0])), SIZE(webbanner_items))
Code: Select all
ReefAngel.Init(); //Initialize controller
// Initialize and start the web banner timer
ReefAngel.LoadWebBanner(pgm_read_word(&(webbanner_items[0])), SIZE(webbanner_items));
curt
Re: here is my PDE i think i am close :D
ok doing that curt removed:
sketch_oct04a:74:error: expected ';' before 'reefangel'
from the list all the other errors are still there
sketch_oct04a:74:error: expected ';' before 'reefangel'
from the list all the other errors are still there
Re: here is my PDE i think i am close :D
It's the ReefAngel_Features.h file.
Please make sure it is just like the above.
Everytime you generate a new code on RAGen, the file gets overwriten.
Curt is working on a new version that will load and save on demand, but until then, you have to make sure to manually change it.
Please make sure it is just like the above.
Everytime you generate a new code on RAGen, the file gets overwriten.
Curt is working on a new version that will load and save on demand, but until then, you have to make sure to manually change it.
Roberto.
Re: here is my PDE i think i am close :D
yep checked and to be honest i didnt use RAGen to create most of thise code. to start i did but i stopped using it and was copy and pasting just the tings i need. but yes the feature file is the same as it was
Re: here is my PDE i think i am close :D
just tested out the code and it works fine. i copied & pasted what you posted as your pde file and the same with your features file. compiled just fine.
what version of the libraries are you running?
what does your reefangel.h file look like?
when you are making the changes with the libraries, you must have arduino closed out for the changes to be recognized.
it sounds like you are not getting some features included, ie, it acts like wifi and DisplayLEDPWM are not defined.
with arduino opened up, goto the File menu and select Preferences. Make sure that the Sketchbook location is the same folder that you are editing your pde file in. Also make sure that sketch folder has a libraries subfolder.
curt
what version of the libraries are you running?
what does your reefangel.h file look like?
when you are making the changes with the libraries, you must have arduino closed out for the changes to be recognized.
it sounds like you are not getting some features included, ie, it acts like wifi and DisplayLEDPWM are not defined.
with arduino opened up, goto the File menu and select Preferences. Make sure that the Sketchbook location is the same folder that you are editing your pde file in. Also make sure that sketch folder has a libraries subfolder.
curt
Re: here is my PDE i think i am close :D
Yeah, same here.
I compiled fine, but when I commented wifi and DisplayLEDPWM, I got the exact same errors you posted above.
I compiled fine, but when I commented wifi and DisplayLEDPWM, I got the exact same errors you posted above.
Roberto.
Re: here is my PDE i think i am close :D
ok not really sure how but, i got it mostly.
here is PDE file:
// Autogenerated file by RAGen (v1.0.4.92), (10/05/2011 22:47)
// RA_100511_2247.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define DisplayImages
#define DisplayLEDPWM
#define wifi
#define RelayExp
*/
#include <ReefAngel_CustomColors.h>
#include <ReefAngel_Colors.h>
#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>
void DrawCustomMain()
{
byte x = 6;
byte y = 2;
byte t;
ReefAngel.LCD.DrawDate(6, 2);
ReefAngel.LCD.Clear(COLOR_BLACK, 1, 11, 132, 11);
pingSerial();
x = 12;
y += MENU_START_ROW+1;
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetDaylightValue(),
DPColor, x, y, 1);
t = intlength(ReefAngel.PWM.GetDaylightValue()) + 1;
t *= 5;
ReefAngel.LCD.DrawText(DPColor, DefaultBGColor, x+t, y, "%");
t += 10;
x += t;
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetActinicValue(),
APColor, x, y, 1);
t = intlength(ReefAngel.PWM.GetActinicValue()) + 1;
t *= 5;
ReefAngel.LCD.DrawText(APColor, DefaultBGColor, x+t, y, "%");
t += 10;
x += t;
char text[7];
ConvertNumToString(text, ReefAngel.Params.PH, 100);
ReefAngel.LCD.Clear(DefaultBGColor, x+16, y, x+45, y+16);
ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, x+16, y, text,
Num8x16);
pingSerial();
ConvertNumToString(text, ReefAngel.Params.Temp1, 10);
y += MENU_START_ROW*2;
x = 10;
ReefAngel.LCD.Clear(DefaultBGColor,x,y,x+(16*4),y+16);
pingSerial();
ReefAngel.LCD.DrawHugeNumbers(T1TempColor, DefaultBGColor, x, y, text);
pingSerial();
x += (16*4) + 8;
ReefAngel.LCD.DrawText(T2TempColor,DefaultBGColor,x,y,"Hood:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp2, T2TempColor,
x+18, y, 10);
ReefAngel.LCD.DrawText(T3TempColor,DefaultBGColor,x,y+10,"LED:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp3, T3TempColor,
x+18, y+10, 10);
y += 16*2;
x = 12;
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(x, y, TempRelay);
}
void DrawCustomGraph()
{
}
// Labels for the web banner
#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "67_kevin";
prog_char probe1_label[] PROGMEM = "Water";
prog_char probe2_label[] PROGMEM = "Room";
prog_char probe3_label[] PROGMEM = "Lights";
prog_char relay1_label[] PROGMEM = "Day";
prog_char relay2_label[] PROGMEM = "Day";
prog_char relay3_label[] PROGMEM = "Day";
prog_char relay4_label[] PROGMEM = "Actinic";
prog_char relay5_label[] PROGMEM = "Actinic";
prog_char relay6_label[] PROGMEM = "Actinic";
prog_char relay7_label[] PROGMEM = "Hood Fan";
prog_char relay8_label[] PROGMEM = "Light Fan";
prog_char relay11_label[] PROGMEM = "Skimmer";
prog_char relay12_label[] PROGMEM = "Sump";
prog_char relay13_label[] PROGMEM = "CO2";
prog_char relay14_label[] PROGMEM = "Vortech";
prog_char relay15_label[] PROGMEM = "Vortech";
prog_char relay16_label[] PROGMEM = "Vortech";
prog_char relay17_label[] PROGMEM = "Return";
prog_char relay18_label[] PROGMEM = "extra";
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,
relay11_label, relay12_label, relay13_label, relay14_label, relay15_label, relay16_label, relay17_label, relay18_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();
// Ports that are always on
ReefAngel.Relay.On(Box1_Port1);
ReefAngel.Relay.On(Box1_Port2);
ReefAngel.Relay.On(Box1_Port3);
ReefAngel.Relay.On(Box1_Port4);
ReefAngel.Relay.On(Box1_Port5);
ReefAngel.Relay.On(Box1_Port6);
ReefAngel.Relay.On(Box1_Port7);
ReefAngel.Relay.On(Box1_Port8);
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardLights(Port1,8,0,21,0);
ReefAngel.StandardLights(Port2,8,0,21,0);
ReefAngel.StandardLights(Port3,8,0,21,0);
ReefAngel.StandardLights(Port4,7,0,22,0);
ReefAngel.StandardLights(Port5,7,0,22,0);
ReefAngel.StandardLights(Port6,7,0,22,0);
ReefAngel.StandardFan(Port7);
ReefAngel.StandardFan(Port8);
ReefAngel.PWM.SetActinic(PWMSlope(7,0,22,0,0,100,60,ReefAngel.PWM.GetActinicValue()));
ReefAngel.PWM.SetDaylight(PWMSlope(8,0,21,0,0,100,60,ReefAngel.PWM.GetDaylightValue()));
// Web Banner stuff
if(ReefAngel.Timer[4].IsTriggered())
{
ReefAngel.Timer[4].Start();
ReefAngel.WebBanner();
}
}
and my Feature file:
#ifndef __REEFANGEL_FEATURES_H__
#define __REEFANGEL_FEATURES_H__
#define SIMPLE_MENU
#define COLORS_PDE
#define NUMBERS_8x16
#define NUMBERS_16x16
#define CUSTOM_MAIN
#define InstalledRelayExpansionModules 1
#define DisplayLEDPWM
#define wifi
#define RelayExp
#define StandardLightSetup
#endif // __REEFANGEL_FEATURES_H__
however as im sure you can see i added a custom menu however i cant see it because the LCD screen if off unless i move the joystick. is that due to the #define SIMPLE_MENU ?
here is PDE file:
// Autogenerated file by RAGen (v1.0.4.92), (10/05/2011 22:47)
// RA_100511_2247.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define DisplayImages
#define DisplayLEDPWM
#define wifi
#define RelayExp
*/
#include <ReefAngel_CustomColors.h>
#include <ReefAngel_Colors.h>
#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>
void DrawCustomMain()
{
byte x = 6;
byte y = 2;
byte t;
ReefAngel.LCD.DrawDate(6, 2);
ReefAngel.LCD.Clear(COLOR_BLACK, 1, 11, 132, 11);
pingSerial();
x = 12;
y += MENU_START_ROW+1;
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetDaylightValue(),
DPColor, x, y, 1);
t = intlength(ReefAngel.PWM.GetDaylightValue()) + 1;
t *= 5;
ReefAngel.LCD.DrawText(DPColor, DefaultBGColor, x+t, y, "%");
t += 10;
x += t;
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetActinicValue(),
APColor, x, y, 1);
t = intlength(ReefAngel.PWM.GetActinicValue()) + 1;
t *= 5;
ReefAngel.LCD.DrawText(APColor, DefaultBGColor, x+t, y, "%");
t += 10;
x += t;
char text[7];
ConvertNumToString(text, ReefAngel.Params.PH, 100);
ReefAngel.LCD.Clear(DefaultBGColor, x+16, y, x+45, y+16);
ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, x+16, y, text,
Num8x16);
pingSerial();
ConvertNumToString(text, ReefAngel.Params.Temp1, 10);
y += MENU_START_ROW*2;
x = 10;
ReefAngel.LCD.Clear(DefaultBGColor,x,y,x+(16*4),y+16);
pingSerial();
ReefAngel.LCD.DrawHugeNumbers(T1TempColor, DefaultBGColor, x, y, text);
pingSerial();
x += (16*4) + 8;
ReefAngel.LCD.DrawText(T2TempColor,DefaultBGColor,x,y,"Hood:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp2, T2TempColor,
x+18, y, 10);
ReefAngel.LCD.DrawText(T3TempColor,DefaultBGColor,x,y+10,"LED:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp3, T3TempColor,
x+18, y+10, 10);
y += 16*2;
x = 12;
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(x, y, TempRelay);
}
void DrawCustomGraph()
{
}
// Labels for the web banner
#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "67_kevin";
prog_char probe1_label[] PROGMEM = "Water";
prog_char probe2_label[] PROGMEM = "Room";
prog_char probe3_label[] PROGMEM = "Lights";
prog_char relay1_label[] PROGMEM = "Day";
prog_char relay2_label[] PROGMEM = "Day";
prog_char relay3_label[] PROGMEM = "Day";
prog_char relay4_label[] PROGMEM = "Actinic";
prog_char relay5_label[] PROGMEM = "Actinic";
prog_char relay6_label[] PROGMEM = "Actinic";
prog_char relay7_label[] PROGMEM = "Hood Fan";
prog_char relay8_label[] PROGMEM = "Light Fan";
prog_char relay11_label[] PROGMEM = "Skimmer";
prog_char relay12_label[] PROGMEM = "Sump";
prog_char relay13_label[] PROGMEM = "CO2";
prog_char relay14_label[] PROGMEM = "Vortech";
prog_char relay15_label[] PROGMEM = "Vortech";
prog_char relay16_label[] PROGMEM = "Vortech";
prog_char relay17_label[] PROGMEM = "Return";
prog_char relay18_label[] PROGMEM = "extra";
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,
relay11_label, relay12_label, relay13_label, relay14_label, relay15_label, relay16_label, relay17_label, relay18_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();
// Ports that are always on
ReefAngel.Relay.On(Box1_Port1);
ReefAngel.Relay.On(Box1_Port2);
ReefAngel.Relay.On(Box1_Port3);
ReefAngel.Relay.On(Box1_Port4);
ReefAngel.Relay.On(Box1_Port5);
ReefAngel.Relay.On(Box1_Port6);
ReefAngel.Relay.On(Box1_Port7);
ReefAngel.Relay.On(Box1_Port8);
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardLights(Port1,8,0,21,0);
ReefAngel.StandardLights(Port2,8,0,21,0);
ReefAngel.StandardLights(Port3,8,0,21,0);
ReefAngel.StandardLights(Port4,7,0,22,0);
ReefAngel.StandardLights(Port5,7,0,22,0);
ReefAngel.StandardLights(Port6,7,0,22,0);
ReefAngel.StandardFan(Port7);
ReefAngel.StandardFan(Port8);
ReefAngel.PWM.SetActinic(PWMSlope(7,0,22,0,0,100,60,ReefAngel.PWM.GetActinicValue()));
ReefAngel.PWM.SetDaylight(PWMSlope(8,0,21,0,0,100,60,ReefAngel.PWM.GetDaylightValue()));
// Web Banner stuff
if(ReefAngel.Timer[4].IsTriggered())
{
ReefAngel.Timer[4].Start();
ReefAngel.WebBanner();
}
}
and my Feature file:
#ifndef __REEFANGEL_FEATURES_H__
#define __REEFANGEL_FEATURES_H__
#define SIMPLE_MENU
#define COLORS_PDE
#define NUMBERS_8x16
#define NUMBERS_16x16
#define CUSTOM_MAIN
#define InstalledRelayExpansionModules 1
#define DisplayLEDPWM
#define wifi
#define RelayExp
#define StandardLightSetup
#endif // __REEFANGEL_FEATURES_H__
however as im sure you can see i added a custom menu however i cant see it because the LCD screen if off unless i move the joystick. is that due to the #define SIMPLE_MENU ?
Re: here is my PDE i think i am close :D
The PDE compiles just fine and the screen shows up just fine without moving the joystick.
The problem most likely is with the LCD Timeout value. That value is probably set to 0 or something very small which means that the screen turns off almost immediately after releasing the joystick or turning on the controller.
There are 3 ways to fix it.
1. Grab my Status App and update the memory value for the LCD Feeding timer.
2. Load up the InternalMemory pde file to update the memory (this will update all values in memory to whatever you put in the file).
3. Copy & Paste this line into your web browser (replacing the IP address with the IP address of your controller) to reset the LCD Timer to it's default value.Where 192.168.0.100 is the IP address of your controller.
600 is the default value for the LCD Timer.
curt
The problem most likely is with the LCD Timeout value. That value is probably set to 0 or something very small which means that the screen turns off almost immediately after releasing the joystick or turning on the controller.
There are 3 ways to fix it.
1. Grab my Status App and update the memory value for the LCD Feeding timer.
2. Load up the InternalMemory pde file to update the memory (this will update all values in memory to whatever you put in the file).
3. Copy & Paste this line into your web browser (replacing the IP address with the IP address of your controller) to reset the LCD Timer to it's default value.
Code: Select all
http://192.168.0.100:2000/mi816,600
600 is the default value for the LCD Timer.
curt
Re: here is my PDE i think i am close :D
It always happens to me too.
I know the minute it happens what to do, but I think it is indeed unexpected to see it happening.
Can we have a quick internal check that doesn't let the LCD timeout be less than 60 seconds?
I know the minute it happens what to do, but I think it is indeed unexpected to see it happening.
Can we have a quick internal check that doesn't let the LCD timeout be less than 60 seconds?
Roberto.
Re: here is my PDE i think i am close :D
Sure thing. I'll put it in next release.rimai wrote:It always happens to me too.
I know the minute it happens what to do, but I think it is indeed unexpected to see it happening.
Can we have a quick internal check that doesn't let the LCD timeout be less than 60 seconds?
curt
Re: here is my PDE i think i am close :D
OK next dumb question. Does the controller just know what outlets I am using for my actinics and daylight LED or is there special code that i need to put in? I will be using outlet 1,2, 3 for daylight and 4,5, 6 for actinics. And one other thing for some reason outlet 3 doesn't come on, even when I go to the IP address and manually put it on auto or on, when it refreshes it goes to off.
Re: here is my PDE i think i am close :D
No, it does not know which are daylight and which are actinic.
Looks like you are getting overheat flag problem.
You need this line just below ReefAngel.Init()
Looks like you are getting overheat flag problem.
You need this line just below ReefAngel.Init()
Code: Select all
ReefAngel.OverheatShutoffPorts = B00000000;
Roberto.
Re: here is my PDE i think i am close :D
OK thanks for the fix for outlet 3. Where would I find the code to tell the head unit which is daylight and actinics?
Re: here is my PDE i think i am close :D
it's just as simple as:chridijon wrote:OK thanks for the fix for outlet 3. Where would I find the code to tell the head unit which is daylight and actinics?
Code: Select all
ReefAngel.StandardLights(Port3);
Code: Select all
ReefAngel.StandardLights(Port4);
If you need them on a different schedule you could either use the long form of the StandardLights function or change one over to use the MHLights function that has the ability to put a minute delay on startup. The choice is up to you.
curt
Re: here is my PDE i think i am close :D
OK so my code posted correct? Daylight on post 1,2, 3 to start ramp up at 8am and ramp down at 8pm and off at 9pm. And actinics on port 4,5, 6 ramp up at 7am and ramp down at 9pm and off at 10pm?
Re: here is my PDE i think i am close :D
i'm back
ok i am trying to get my fans to come on with temp readings. but the fans just stay on and never go off. 1 is for my led fans the other is my hood fan to cool down the water. here is the code:
// Autogenerated file by RAGen (v1.0.4.92), (10/05/2011 22:47)
// RA_100511_1921.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define DisplayImages
#define DisplayLEDPWM
#define wifi
#define RelayExp
*/
#include <ReefAngel_CustomColors.h>
#include <ReefAngel_Colors.h>
#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>
void DrawCustomMain()
{
byte x = 6;
byte y = 2;
byte t;
ReefAngel.LCD.DrawDate(6, 2);
ReefAngel.LCD.Clear(COLOR_BLACK, 1, 11, 132, 11);
pingSerial();
x = 12;
y += MENU_START_ROW+1;
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetDaylightValue(),
DPColor, x, y, 1);
t = intlength(ReefAngel.PWM.GetDaylightValue()) + 1;
t *= 5;
ReefAngel.LCD.DrawText(DPColor, DefaultBGColor, x+t, y, "%");
t += 10;
x += t;
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetActinicValue(),
APColor, x, y, 1);
t = intlength(ReefAngel.PWM.GetActinicValue()) + 1;
t *= 5;
ReefAngel.LCD.DrawText(APColor, DefaultBGColor, x+t, y, "%");
t += 10;
x += t;
char text[7];
ConvertNumToString(text, ReefAngel.Params.PH, 100);
ReefAngel.LCD.Clear(DefaultBGColor, x+16, y, x+45, y+16);
ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, x+16, y, text,
Num8x16);
pingSerial();
ConvertNumToString(text, ReefAngel.Params.Temp1, 10);
y += MENU_START_ROW*2;
x = 10;
ReefAngel.LCD.Clear(DefaultBGColor,x,y,x+(16*4),y+16);
pingSerial();
ReefAngel.LCD.DrawHugeNumbers(T1TempColor, DefaultBGColor, x, y, text);
pingSerial();
x += (16*4) + 8;
ReefAngel.LCD.DrawText(T2TempColor,DefaultBGColor,x,y,"Hood:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp2, T2TempColor,
x+18, y, 10);
ReefAngel.LCD.DrawText(T3TempColor,DefaultBGColor,x,y+10,"LED:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp3, T3TempColor,
x+18, y+10, 10);
y += 16*2;
x = 12;
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(x, y, TempRelay);
}
void DrawCustomGraph()
{
}
// Labels for the web banner
#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "67_kevin";
prog_char probe1_label[] PROGMEM = "Water";
prog_char probe2_label[] PROGMEM = "Room";
prog_char probe3_label[] PROGMEM = "Lights";
prog_char relay1_label[] PROGMEM = "Day";
prog_char relay2_label[] PROGMEM = "Day";
prog_char relay3_label[] PROGMEM = "Day";
prog_char relay4_label[] PROGMEM = "Actinic";
prog_char relay5_label[] PROGMEM = "Actinic";
prog_char relay6_label[] PROGMEM = "Actinic";
prog_char relay7_label[] PROGMEM = "Hood Fan";
prog_char relay8_label[] PROGMEM = "Light Fan";
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
ReefAngel.OverheatShutoffPorts = B00000000;
ReefAngel.PHMin=529;
ReefAngel.PHMax=819;
// turn on port 7 when temp gets above 79.0 and turn off when temp gets below 76.0
if (ReefAngel.Params.Temp3 >= 770 && ReefAngel.Params.Temp3 > 0) ReefAngel.Relay.On(Port7);
if (ReefAngel.Params.Temp3 <= 740) ReefAngel.Relay.Off(Port7);
// turn on port 8 when temp gets above 90.0 and turn off when temp gets below 75.0
if (ReefAngel.Params.Temp2 >= 850 && ReefAngel.Params.Temp2 > 0) ReefAngel.Relay.On(Port8);
if (ReefAngel.Params.Temp2 <= 750) ReefAngel.Relay.Off(Port8);
// 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();
// Ports that are always on
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardLights(Port1,8,0,21,0);
ReefAngel.StandardLights(Port2,8,0,21,0);
ReefAngel.StandardLights(Port3,8,0,21,0);
ReefAngel.StandardLights(Port4,7,0,22,0);
ReefAngel.StandardLights(Port5,7,0,22,0);
ReefAngel.StandardLights(Port6,7,0,22,0);
ReefAngel.StandardFan(Port7);
ReefAngel.StandardFan(Port8);
ReefAngel.PWM.SetActinic(PWMSlope(7,0,22,0,0,100,60,ReefAngel.PWM.GetActinicValue()));
ReefAngel.PWM.SetDaylight(PWMSlope(8,0,21,0,0,100,60,ReefAngel.PWM.GetDaylightValue()));
// Web Banner stuff
if(ReefAngel.Timer[4].IsTriggered())
{
ReefAngel.Timer[4].Start();
ReefAngel.WebBanner();
}
}
thanx for all the help
ok i am trying to get my fans to come on with temp readings. but the fans just stay on and never go off. 1 is for my led fans the other is my hood fan to cool down the water. here is the code:
// Autogenerated file by RAGen (v1.0.4.92), (10/05/2011 22:47)
// RA_100511_1921.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define DisplayImages
#define DisplayLEDPWM
#define wifi
#define RelayExp
*/
#include <ReefAngel_CustomColors.h>
#include <ReefAngel_Colors.h>
#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>
void DrawCustomMain()
{
byte x = 6;
byte y = 2;
byte t;
ReefAngel.LCD.DrawDate(6, 2);
ReefAngel.LCD.Clear(COLOR_BLACK, 1, 11, 132, 11);
pingSerial();
x = 12;
y += MENU_START_ROW+1;
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetDaylightValue(),
DPColor, x, y, 1);
t = intlength(ReefAngel.PWM.GetDaylightValue()) + 1;
t *= 5;
ReefAngel.LCD.DrawText(DPColor, DefaultBGColor, x+t, y, "%");
t += 10;
x += t;
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetActinicValue(),
APColor, x, y, 1);
t = intlength(ReefAngel.PWM.GetActinicValue()) + 1;
t *= 5;
ReefAngel.LCD.DrawText(APColor, DefaultBGColor, x+t, y, "%");
t += 10;
x += t;
char text[7];
ConvertNumToString(text, ReefAngel.Params.PH, 100);
ReefAngel.LCD.Clear(DefaultBGColor, x+16, y, x+45, y+16);
ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, x+16, y, text,
Num8x16);
pingSerial();
ConvertNumToString(text, ReefAngel.Params.Temp1, 10);
y += MENU_START_ROW*2;
x = 10;
ReefAngel.LCD.Clear(DefaultBGColor,x,y,x+(16*4),y+16);
pingSerial();
ReefAngel.LCD.DrawHugeNumbers(T1TempColor, DefaultBGColor, x, y, text);
pingSerial();
x += (16*4) + 8;
ReefAngel.LCD.DrawText(T2TempColor,DefaultBGColor,x,y,"Hood:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp2, T2TempColor,
x+18, y, 10);
ReefAngel.LCD.DrawText(T3TempColor,DefaultBGColor,x,y+10,"LED:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp3, T3TempColor,
x+18, y+10, 10);
y += 16*2;
x = 12;
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(x, y, TempRelay);
}
void DrawCustomGraph()
{
}
// Labels for the web banner
#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "67_kevin";
prog_char probe1_label[] PROGMEM = "Water";
prog_char probe2_label[] PROGMEM = "Room";
prog_char probe3_label[] PROGMEM = "Lights";
prog_char relay1_label[] PROGMEM = "Day";
prog_char relay2_label[] PROGMEM = "Day";
prog_char relay3_label[] PROGMEM = "Day";
prog_char relay4_label[] PROGMEM = "Actinic";
prog_char relay5_label[] PROGMEM = "Actinic";
prog_char relay6_label[] PROGMEM = "Actinic";
prog_char relay7_label[] PROGMEM = "Hood Fan";
prog_char relay8_label[] PROGMEM = "Light Fan";
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
ReefAngel.OverheatShutoffPorts = B00000000;
ReefAngel.PHMin=529;
ReefAngel.PHMax=819;
// turn on port 7 when temp gets above 79.0 and turn off when temp gets below 76.0
if (ReefAngel.Params.Temp3 >= 770 && ReefAngel.Params.Temp3 > 0) ReefAngel.Relay.On(Port7);
if (ReefAngel.Params.Temp3 <= 740) ReefAngel.Relay.Off(Port7);
// turn on port 8 when temp gets above 90.0 and turn off when temp gets below 75.0
if (ReefAngel.Params.Temp2 >= 850 && ReefAngel.Params.Temp2 > 0) ReefAngel.Relay.On(Port8);
if (ReefAngel.Params.Temp2 <= 750) ReefAngel.Relay.Off(Port8);
// 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();
// Ports that are always on
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardLights(Port1,8,0,21,0);
ReefAngel.StandardLights(Port2,8,0,21,0);
ReefAngel.StandardLights(Port3,8,0,21,0);
ReefAngel.StandardLights(Port4,7,0,22,0);
ReefAngel.StandardLights(Port5,7,0,22,0);
ReefAngel.StandardLights(Port6,7,0,22,0);
ReefAngel.StandardFan(Port7);
ReefAngel.StandardFan(Port8);
ReefAngel.PWM.SetActinic(PWMSlope(7,0,22,0,0,100,60,ReefAngel.PWM.GetActinicValue()));
ReefAngel.PWM.SetDaylight(PWMSlope(8,0,21,0,0,100,60,ReefAngel.PWM.GetDaylightValue()));
// Web Banner stuff
if(ReefAngel.Timer[4].IsTriggered())
{
ReefAngel.Timer[4].Start();
ReefAngel.WebBanner();
}
}
thanx for all the help
Re: here is my PDE i think i am close :D
You've got the fan code in the wrong place. You are checking the temperature stuff for your fans in the setup() which only gets run once at controller startup. That code should be place inside the loop() function which runs continuously (hence the name, loop). Also, you have the function StandardFan that would interfere with anything else you will be doing with the fan ports.
I also cleaned up your condition checks. You don't need the >0 check when you are checking for temps above your max temp because that will always be true. However, you would want that when you are checking your lowest temp to ensure that the temp sensor isn't unplugged or getting a random/bad reading.
Here's what your setup() and loop() should look like:
curt
I also cleaned up your condition checks. You don't need the >0 check when you are checking for temps above your max temp because that will always be true. However, you would want that when you are checking your lowest temp to ensure that the temp sensor isn't unplugged or getting a random/bad reading.
Here's what your setup() and loop() should look like:
Code: Select all
void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.OverheatShutoffPorts = B00000000;
ReefAngel.PHMin=529;
ReefAngel.PHMax=819;
// 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();
}
void loop()
{
// Specific functions
ReefAngel.StandardLights(Port1,8,0,21,0);
ReefAngel.StandardLights(Port2,8,0,21,0);
ReefAngel.StandardLights(Port3,8,0,21,0);
ReefAngel.StandardLights(Port4,7,0,22,0);
ReefAngel.StandardLights(Port5,7,0,22,0);
ReefAngel.StandardLights(Port6,7,0,22,0);
// turn on port 7 when temp gets above 77.0 and turn off when temp gets below 74.0
if (ReefAngel.Params.Temp3 >= 770) ReefAngel.Relay.On(Port7);
if (ReefAngel.Params.Temp3 <= 740 && ReefAngel.Params.Temp3 > 0) ReefAngel.Relay.Off(Port7);
// turn on port 8 when temp gets above 85.0 and turn off when temp gets below 75.0
if (ReefAngel.Params.Temp2 >= 850) ReefAngel.Relay.On(Port8);
if (ReefAngel.Params.Temp2 <= 750 && ReefAngel.Params.Temp2 > 0) ReefAngel.Relay.Off(Port8);
ReefAngel.PWM.SetActinic(PWMSlope(7,0,22,0,0,100,60,ReefAngel.PWM.GetActinicValue()));
ReefAngel.PWM.SetDaylight(PWMSlope(8,0,21,0,0,100,60,ReefAngel.PWM.GetDaylightValue()));
// Web Banner stuff
if(ReefAngel.Timer[4].IsTriggered())
{
ReefAngel.Timer[4].Start();
ReefAngel.WebBanner();
}
ReefAngel.ShowInterface();
}