PDE with PWM Slope, Salinity, Expansion, I.o.

Share you PDE file with our community
Post Reply
ruckusman
Posts: 34
Joined: Sun Nov 27, 2011 6:51 am

PDE with PWM Slope, Salinity, Expansion, I.o.

Post by ruckusman »

Is it possible to get all that on the controller. I can't get enough stuff removed from the file to keep from getting a file to big error. I have simple menu, no date and time, and it says to big, even when i remove the I.o. it says too big...
ruckusman
Posts: 34
Joined: Sun Nov 27, 2011 6:51 am

Re: PDE with PWM Slope, Salinity, Expansion, I.o.

Post by ruckusman »

Does anyone have a PDE with those that they could post that I could try?
ruckusman
Posts: 34
Joined: Sun Nov 27, 2011 6:51 am

Re: PDE with PWM Slope, Salinity, Expansion, I.o.

Post by ruckusman »

this is my closest attempt that isn't too big...


#include <Salinity.h>
#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>
#include <RA_CustomColors.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <ReefAngel.h>

void DrawCustomMain()
{
// the graph is drawn/updated when we exit the main menu &
// when the parameters are saved
ReefAngel.LCD.DrawDate(6, 122);
pingSerial();
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params);
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();
char text[10];
ConvertNumToString(text, ReefAngel.Params.Salinity, 10);
strcat(text," ");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,15,93,"Salinity:");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,75,93,text);
pingSerial();
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 103, TempRelay);
}

void DrawCustomGraph()
{
ReefAngel.LCD.DrawGraph(5, 5);
}

/*

For more information about custom main screen: http://forum.reefangel.com/viewtopic.php?f=14&t=109

To be able to use the custom main screen and salinity, please make sure that you enabled custom main screen and salinity on your features file.
Open RAGen and make sure you have Custom Main Screen and Salinity checked under the Features tab.

Or, you can manually edit the file.
The file is located at "Documents\Arduino\libraries\ReefAngel_Features.h" file and has to include this line in it:

#define CUSTOM_MAIN
#define SALINITYEXPANSION

*/

void setup()
{
ReefAngel.Init(); //Initialize controller
// Ports that are always on
ReefAngel.Relay.On(Port4);
ReefAngel.Relay.On(Port5);
ReefAngel.Relay.On(Port6);
ReefAngel.Relay.On(Port8);

}

void loop()
{
// Specific functions
ReefAngel.StandardATO(Port1);
ReefAngel.StandardLights(Port2);
ReefAngel.MHLights(Port3);
ReefAngel.StandardHeater(Port7);
ReefAngel.Portal("ruckusman");

ReefAngel.ShowInterface();
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PDE with PWM Slope, Salinity, Expansion, I.o.

Post by rimai »

I'm using the next proposed release of libraries.
It's being tested to make sure everything is fine with it.
I was able to reduce a little bit of the libraries.
The code above compiles at:
Binary sketch size: 29,250 bytes (of a 32,256 byte maximum)
Roberto.
ruckusman
Posts: 34
Joined: Sun Nov 27, 2011 6:51 am

Re: PDE with PWM Slope, Salinity, Expansion, I.o.

Post by ruckusman »

When I put in the LED code it gets to big though...am I doing it wrong?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PDE with PWM Slope, Salinity, Expansion, I.o.

Post by rimai »

Can I see the code you have now?
Roberto.
Post Reply