Page 1 of 1

Arduino Sketch To Big Issue ??? HELP !

Posted: Sat Jul 05, 2014 3:24 am
by jcondello
Hi Ive been compiling code for a while now and making changes to setting etc. and uploading with no issue, now i am getting an error when compiling "sketch to big" please help here is the code below, but nothing has changed since last update ??


*********************************************************************************************
#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 <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <ReefAngel.h>

////// Place global variable code below here


////// Place global variable code above here


void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature

// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port4Bit | Port5Bit | Port6Bit;
ReefAngel.FeedingModePortsE[0] = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port3Bit | Port4Bit | Port5Bit | Port6Bit;
ReefAngel.WaterChangePortsE[0] = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
ReefAngel.LightsOnPortsE[0] = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit;
ReefAngel.OverheatShutoffPortsE[0] = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 280 );


// Ports that are always on
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );

////// Place additional initialization code below here


////// Place additional initialization code above here
}

void loop()
{
ReefAngel.StandardHeater( Port2,260,265 );
ReefAngel.StandardFan( Port8,270,275 );
ReefAngel.DosingPumpRepeat( Box1_Port1,0,1440,1 );
ReefAngel.DosingPumpRepeat( Box1_Port2,5,1440,8 );
////// Place your custom code below here


////// Place your custom code above here

// This should always be the last line
ReefAngel.Portal( "jcondello","NUMBER7" );
ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
int x,y;
char text[10];
// I/O Expansion
byte bkcolor;
x = 14;
y = 8;
for ( int a=0;a<6;a++ )
{
ReefAngel.LCD.DrawCircleOutline( x+(a*20),y,4,COLOR_MEDIUMORCHID );
if ( ReefAngel.IO.GetChannel(a) ) bkcolor=COLOR_WHITE; else bkcolor=COLOR_GRAY;
ReefAngel.LCD.FillCircle( x+(a*20),y,2,bkcolor );
}
pingSerial();

// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 19, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 19, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();

// Salinity
ReefAngel.LCD.DrawText( COLOR_DARKKHAKI,DefaultBGColor,49,53, "SAL:" );
ReefAngel.LCD.DrawSingleMonitor( ReefAngel.Params.Salinity,COLOR_DARKKHAKI,73,53, 10 );
pingSerial();

// pH Expansion
ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,15,68, "PHE:" );
ReefAngel.LCD.DrawSingleMonitor( ReefAngel.Params.PHExp,COLOR_MEDIUMSEAGREEN,39,68, 100 );
pingSerial();

// Water Level
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,75,68, "WL:" );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,68, ReefAngel.WaterLevel.GetLevel() );
pingSerial();

// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 82, TempRelay );
pingSerial();

// Relay Expansion
TempRelay = ReefAngel.Relay.RelayDataE[0];
TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
ReefAngel.LCD.DrawOutletBox( 12, 99, TempRelay );
pingSerial();

// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}

void DrawCustomGraph()
{
}

Re: Arduino Sketch To Big Issue ??? HELP !

Posted: Sat Jul 05, 2014 10:43 am
by Sacohen
Do you have the RA or RA+?
I see the DCPumps in there. Did you just add that?

The DCPump code added a lot to the libraries and most of the time that is the cause of your problem.

You may need to upgrade to the RA+ or go back to an older library.

Re: Arduino Sketch To Big Issue ??? HELP !

Posted: Sun Jul 06, 2014 6:29 am
by jcondello
I do have the ra+ but the issue is when compiling not uploading ??

Re: Arduino Sketch To Big Issue ??? HELP !

Posted: Sun Jul 06, 2014 6:32 am
by Sacohen
Make sure. You have the Aurduino ser to RA + and not RA. It may have gotten changed by accident.

Re: Arduino Sketch To Big Issue ??? HELP !

Posted: Sun Jul 06, 2014 6:49 am
by jcondello
yes thank you thats all it was

Re: Arduino Sketch To Big Issue ??? HELP !

Posted: Sun Jul 06, 2014 6:52 am
by jcondello
can you help put with setting the RA to send data to the portal i have added the user name & portal Key to the code but have not had any luck with it, i can use the portal switching on/off but cant get the ra to send data, i also have the Wifi dongle attached & work thank you

Re: Arduino Sketch To Big Issue ??? HELP !

Posted: Sun Jul 06, 2014 6:53 am
by jcondello
never mind just got it going thank you !

Re: Arduino Sketch To Big Issue ??? HELP !

Posted: Sun Jul 06, 2014 6:58 am
by Sacohen
No problem. It's usually something simple like that.