V 1.0.9 Sketch to large

Related to the development libraries, released by Curt Binder
Post Reply
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

V 1.0.9 Sketch to large

Post by coolbird »

Hi

I ran the update tonight and ran the wizard, included the dc pump setting and entered my wp40 settings and when I tried to update I got a "Sketch to large error"

I have a standard RA

Thanks
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: V 1.0.9 Sketch to large

Post by lnevo »

The dcpump takes a lot of memory. See if you have other stuff that can be removed like large fonts or standardmenu..
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: V 1.0.9 Sketch to large

Post by coolbird »

lnevo wrote:The dcpump takes a lot of memory. See if you have other stuff that can be removed like large fonts or standardmenu..
I have not added anything to the standard script, so forgive my ignorance but these items you mentioned are safe to remove?
Image
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: V 1.0.9 Sketch to large

Post by DrewPalmer04 »

I updated too and my exact same sketch (unmodified) went to "sketch too large" without any changes. :(
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
Sebyte

Re: V 1.0.9 Sketch to large

Post by Sebyte »

I noticed the same issue when moving to v1.0.9.

Using the new library function I have been testing a WP-25 on an original RA board (32,225 bytes memory) with my standard build.

I found that both the new ReefAngel.DCPump.DaylightChannel , ReefAngel.DCPump.ActinicChannel and .DCPump.LowATOChannel , create very large INO files.

As a test I built a Vanilla file with no functionality.

This "Vanilla" .ino file had a size of 27,802 bytes, which seems larger than on previous versions.

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
    
    InternalMemory.LCDID_write(0);
    
    ReefAngel.Init();  //Initialize controller
    

  

    // Ports that are always on

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

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

void loop()
{
   
    ////// Place your custom code below here
    

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

    // This should always be the last line
    ReefAngel.Portal( "sebyte-jebo" );
    ReefAngel.ShowInterface();
}
The next file was Vanilla + DC pump on PWM channels had a file size of 36,798 bytes

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
    
    InternalMemory.LCDID_write(0);
    
    ReefAngel.Init();  //Initialize controller
    
    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on

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

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

void loop()
{
    ReefAngel.DCPump.UseMemory = true;
    ReefAngel.DCPump.DaylightChannel = None;
    ReefAngel.DCPump.ActinicChannel = None;
    
    ////// Place your custom code below here
    

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

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

 
The I set the file for Vanilla + DCPump.LowATOChannel, which had a complied size of 36,794 bytes.

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
    
    InternalMemory.LCDID_write(0);
    
    ReefAngel.Init();  //Initialize controller
    

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on

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

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

void loop()
{
    ReefAngel.DCPump.UseMemory = true;

    ReefAngel.DCPump.LowATOChannel = Sync ; // Jebo connected to AtoPINLow
  

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

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

I have also tried removing library files for things that I do not have such as salinity and ORP modules. Arduino web site advises that this can be a way to reduce the sketch size. Unfortunatly that had no effect for me.

The conclusion I have come to is that the V1.0.9 library files are using more memory as they have fixed bugs and increased functionality. I feel that neither of the two new DC pump options can be used with the basic RA controller even with a massively stripped down INO file on a standard RA head unit.

So I opted to up grade to RA plus and am waiting for it to arrive.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: V 1.0.9 Sketch to large

Post by lnevo »

You can use the traditional setting channels directly on the pwm ports. If you do not reference the dcpump class it will not be included and will therefore not use the new code. You will still have the latest library with all the bug fixes etc.
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: V 1.0.9 Sketch to large

Post by coolbird »

Sebyte wrote:I noticed the same issue when moving to v1.0.9.

Using the new library function I have been testing a WP-25 on an original RA board (32,225 bytes memory) with my standard build.

I found that both the new ReefAngel.DCPump.DaylightChannel , ReefAngel.DCPump.ActinicChannel and .DCPump.LowATOChannel , create very large INO files.

As a test I built a Vanilla file with no functionality.

This "Vanilla" .ino file had a size of 27,802 bytes, which seems larger than on previous versions.

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
    
    InternalMemory.LCDID_write(0);
    
    ReefAngel.Init();  //Initialize controller
    

  

    // Ports that are always on

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

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

void loop()
{
   
    ////// Place your custom code below here
    

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

    // This should always be the last line
    ReefAngel.Portal( "sebyte-jebo" );
    ReefAngel.ShowInterface();
}
The next file was Vanilla + DC pump on PWM channels had a file size of 36,798 bytes

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
    
    InternalMemory.LCDID_write(0);
    
    ReefAngel.Init();  //Initialize controller
    
    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on

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

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

void loop()
{
    ReefAngel.DCPump.UseMemory = true;
    ReefAngel.DCPump.DaylightChannel = None;
    ReefAngel.DCPump.ActinicChannel = None;
    
    ////// Place your custom code below here
    

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

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

 
The I set the file for Vanilla + DCPump.LowATOChannel, which had a complied size of 36,794 bytes.

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
    
    InternalMemory.LCDID_write(0);
    
    ReefAngel.Init();  //Initialize controller
    

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on

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

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

void loop()
{
    ReefAngel.DCPump.UseMemory = true;

    ReefAngel.DCPump.LowATOChannel = Sync ; // Jebo connected to AtoPINLow
  

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

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

I have also tried removing library files for things that I do not have such as salinity and ORP modules. Arduino web site advises that this can be a way to reduce the sketch size. Unfortunatly that had no effect for me.

The conclusion I have come to is that the V1.0.9 library files are using more memory as they have fixed bugs and increased functionality. I feel that neither of the two new DC pump options can be used with the basic RA controller even with a massively stripped down INO file on a standard RA head unit.

So I opted to up grade to RA plus and am waiting for it to arrive.
I commend your efforts and you are probably right, if I want to use my wp40's with RA through the wizard I will also need to upgrade :shock:
Image
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: V 1.0.9 Sketch to large

Post by DrewPalmer04 »

I had to remove my LCD date/time from my screen to get it to fit. Looks like time to downgrade.
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: V 1.0.9 Sketch to large

Post by coolbird »

Why is the WP settings and pwm in the wizard it doesnt seem to make sense to me in the standard setup, unless of course your able to choose whether you have the additional dimming attchmant?
Wouldn't only adding pwm if the attachment was chosen save room in the sketch
Or am i missing something!
Image
Post Reply