Size Issues

Do you have a question on how to do something.
Ask in here.
Post Reply
maleci
Posts: 18
Joined: Wed Mar 28, 2012 4:03 pm

Size Issues

Post by maleci »

Well I finally got my tank setup and plumbed together and threw together some code to get the ato/heaters/dosing pumps/return/fuge light going at least. I can play with hooking up the mp40's and radions down the road since they are self controlled for the time being. When I try to compile the code it keeps coming back with space being just slightly over what is available and I'm not sure exactly how to cut it down. I went and knocked out some of the includes for features I wasn't using but that didn't seem to do anything. Below is what I have currently, any suggestions on how to get it to fit? It doesn't seem like anything too complex that should eat that much space.



#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 <ReefAngel.h>

/*
Ports assignment:

Port1 - Heater1
Port2 - Dosing 1 CA
Port3 - Heater2
Port4 - Dosing 2 ALK
Port5 - Fuge Light
Port6 - Dosing 3 MG
Port7 - Return Pump
Port8 - ATO
*/

void setup()
{
ReefAngel.Init();
ReefAngel.FeedingModePorts = Port7Bit;
ReefAngel.WaterChangePorts = Port7Bit | Port8Bit;
ReefAngel.Relay.On(Port7); // Turn on Return Pump
}

void loop()
{
ReefAngel.Portal("maleci","**********");
ReefAngel.SingleATOLow(Port8);
ReefAngel.StandardLights(Port5,19,00,8,00); // Lights on at 7pm and off at 8am
ReefAngel.StandardHeater(Port1,770,780); // Heater on at 77.0F and off at 78.0F
ReefAngel.StandardHeater(Port3,770,780); // Heater on at 77.0F and off at 78.0F
ReefAngel.DosingPumpRepeat(Port2,01,360,60); // Dose for 60 seconds every 6 hours with one minute offset
ReefAngel.DosingPumpRepeat(Port4,240,360,30); // Dose for 30 seconds every 6 hours with 4 hour offset
ReefAngel.DosingPumpRepeat(Port6,120,360,30); // Dose for 30 seconds every 6 hours with 2 hour offset

/*

If you get a compile error similar to this:
'class ReefAngelClass' has no member named 'Portal'
Please make sure that you enabled wifi on your features file.

Open RAGen and make sure you have wifi 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 wifi

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

Re: Size Issues

Post by rimai »

Open RAGen
Move to Features tab
Make sure that you have date/time unchecked and simple menu checked.
Click Save button.
Upload code again.
I also recommend moving the Portal() function to just above ShowInterface() as opposed to first line in the code.
Roberto.
Post Reply