Sketch too big?

Share you PDE file with our community
Post Reply
Spotted
Posts: 101
Joined: Thu May 10, 2012 5:46 am
Location: Sunny (and hot) South Florida

Sketch too big?

Post by Spotted »

So I used the wizard built into the Arduino software and when it compiled, I got an error message that the sketch is too big. I don't have anything fancy in it. Can someone please look over he code and see if I got something in there that is wrong? I am also adding that I made this on a fresh install on a laptop that was recently upgraded to Windows 8.1 Pro if that makes any difference.
I am trying to load this into a regular Reef Angel, not an RA+

Thanks!!

Code: Select all

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


    // Ports that are always on
    ReefAngel.Relay.On( Box1_Port1 );
    ReefAngel.Relay.On( Box1_Port3 );

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

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

void loop()
{
    ReefAngel.SingleATO( true,Port1,60,0 );
    ReefAngel.StandardLights( Port2,19,0,7,0 );
    ReefAngel.StandardLights( Port3,9,0,17,0 );
    ReefAngel.StandardLights( Port4,10,0,16,0 );
    ReefAngel.StandardLights( Port5,6,0,22,0 );
    ReefAngel.Relay.DelayedOn( Port7,5 );
    ReefAngel.Relay.DelayedOn( Port8,2 );
    ReefAngel.Relay.DelayedOn( Box1_Port2,2 );
    ReefAngel.StandardLights( Box1_Port7,9,0,17,0 );
    ReefAngel.StandardLights( Box1_Port8,10,0,16,0 );
    ReefAngel.PWM.SetDaylight( PWMParabola(10,0,16,0,10,80,10) );
    ReefAngel.PWM.SetActinic( PWMSlope(9,0,17,0,15,95,80,15) );
    ////// Place your custom code below here
    

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

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

Image
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Sketch too big?

Post by Sacohen »

That is your problem right there.
With all the updates and additions to the code you can't really fit anything on an RA.

Remove the DCPump.h and see if that helps.

You may need to remove some other things that you aren't using too.
Spotted
Posts: 101
Joined: Thu May 10, 2012 5:46 am
Location: Sunny (and hot) South Florida

Re: Sketch too big?

Post by Spotted »

Ok, so if I remove all this stuff will that help? I assume that this stuff is only actually used if I have those modules?
#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>
Image
Spotted
Posts: 101
Joined: Thu May 10, 2012 5:46 am
Location: Sunny (and hot) South Florida

Re: Sketch too big?

Post by Spotted »

OK I removed all the stuff I put up in my last post and when I verify it still says it's too big. Is there anything else I can remove? I assume all the other stuff is for basic operation of the RA itself.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Sketch too big?

Post by lnevo »

Either stay running with the older library version or it's time to upgrade to the +
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Sketch too big?

Post by rimai »

I checked and that code wouldn't compile in the old libraries either.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Sketch too big?

Post by lnevo »

So one relay box expansion and you can't use the standard RA? Maybe we need a stripped down library to accomodate those users? or something more modular..?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Sketch too big?

Post by rimai »

It's the wifi :(
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Sketch too big?

Post by rimai »

It's the wifi :(
Roberto.
Spotted
Posts: 101
Joined: Thu May 10, 2012 5:46 am
Location: Sunny (and hot) South Florida

Re: Sketch too big?

Post by Spotted »

So the new wifi libraries are killing my code? I've had the wifi for a while now and it's been working. So I need an RA+ is the solution? I've only had my RA almost 2 years..
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Sketch too big?

Post by rimai »

Are you sure that was the code you had before?
Roberto.
Spotted
Posts: 101
Joined: Thu May 10, 2012 5:46 am
Location: Sunny (and hot) South Florida

Re: Sketch too big?

Post by Spotted »

The only difference between this code and the code running on my RA now is the dimming. I added the dimming to this new code, but otherwise it is the same. Last time I played with the code was back in May/Juneish..
Now this isn't the exact code running on my RA. I recently formatted and my PC and with it went the original code. This is newly generated code by the wizard in the programmed, but the original code was also generated using the wizard. Like I said the only difference is the dimming.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Sketch too big?

Post by rimai »

When I removed the dimming, I was able to compile just fine on the latest libs too.
So, looks like when you add the dimming, you go above the capacity of the standard RA.
Roberto.
Spotted
Posts: 101
Joined: Thu May 10, 2012 5:46 am
Location: Sunny (and hot) South Florida

Re: Sketch too big?

Post by Spotted »

OK so then its dimming or WiFi. If I want both then I gotta upgrade? That kinda sucks..
Image
Spotted
Posts: 101
Joined: Thu May 10, 2012 5:46 am
Location: Sunny (and hot) South Florida

Re: Sketch too big?

Post by Spotted »

Can I dump the menu for the controller to make room? I use my phone or tablet or PC for the menu. Would that help any? And/or the joystick function? Hell anything dealing with the actual control unit? Like I said, I don't use the control at all. Everything I do is through a phone tablet or PC.
Just a thought...
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Sketch too big?

Post by rimai »

I tried it and it is still not enough.
The only way I think you will be able to size it down is to directly accessing the dimming port, but that will mean you won't be able to see AP/DP on the android app.
Would that work?
Roberto.
smande00
Posts: 13
Joined: Mon Mar 10, 2014 2:10 pm

Re: Sketch too big?

Post by smande00 »

I've run into the same road block. I'm a ways off from getting around to doing anything about it, but my plan is to attempt to offload most of the logic to a PC and use the Reef Angel primarily as a sensor aggregator and on/off/dim executor. Hopefully that's possible, otherwise I'll be in for the upgrade too :)
Post Reply