Page 1 of 1

Sketch Too big ?! Help please

Posted: Sun Jun 05, 2011 11:04 am
by astralmind
Hi, I've just generated my first PDE which is extremely straight forward and minimalist. (removed PWM, version info etc..). Unfortunately, when I try to compile the code I get the Sketch too big error.

Here's what it looks like (nothing was added manually) :

Code: Select all

// Autogenerated file by RAGen (v1.0.4.92), (06/05/2011 14:00)
// RA_060511_1400.pde
//
// This version designed for v0.8.5 Beta 12 or later

/* The following features are enabled for this PDE File: 
#define DisplayImages
#define WavemakerSetup
#define DateTimeSetup
#define ATOSetup
#define MetalHalideSetup
#define DirectTempSensor
#define wifi
#define SingleATOSetup
#define StandardLightSetup
*/


#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>


void setup()
{
    ReefAngel.Init();  //Initialize controller

    ReefAngel.OverheatShutoffPorts = B00000110;

    // Ports that are always on
    ReefAngel.Relay.On(Port8);
}

void loop()
{
    ReefAngel.ShowInterface();

    // Specific functions
    ReefAngel.SingleATOLow(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.MHLights(Port3);
    ReefAngel.Wavemaker1(Port4);
    ReefAngel.Wavemaker2(Port5);
    ReefAngel.StandardFan(Port6);
    ReefAngel.StandardHeater(Port7);
}
Any thoughts ?

Re: Sketch Too big ?! Help please

Posted: Sun Jun 05, 2011 12:03 pm
by astralmind
Ok I just managed to shrink the file size enough but surely, I must be doing something wrong. Using RAgen

I had to disable:

- Display Images
- Display LED PWM
- Version Menu
- Wavemaker Functions (ie put both my PH in "Always on")

And I only enabled Wifi as a "non standard" item. I kept the default feeding/waterchange etc modes.

I wanted to add a short function Roberto had suggested for WifiAlerts (I wanted and alert if ATO high was triggered) and could not even add that short piece of code, only a few lines. I'd definitly like to use the wavemaker function as well as that piece of code for Wifi Alerts. What if I want to add the upcoming Moonlight modules in the future ?

I see a lot of people posting very elaborate PDE files and coding various addtional functions (delay timer, invert ATO, custom alerts and settings etc) so there has to be a way to include more settings without exceeding the file limitation.

What am I doing wrong ?

Re: Sketch Too big ?! Help please

Posted: Sun Jun 05, 2011 12:05 pm
by rimai
Try not including date and time setup. It takes a lot of program space. You really won't be changing time unless it's daylight savings change.

Re: Sketch Too big ?! Help please

Posted: Sun Jun 05, 2011 12:19 pm
by astralmind
rimai wrote:Try not including date and time setup. It takes a lot of program space. You really won't be changing time unless it's daylight savings change.
Cool ! From the description it seemed fairly critical but I just saw that it dead eat up a lot of space. I'll change that right away!

I'm trying to use the code you had suggested to send wifi alert. You mentioned I had to configure the Wifi add on for it to work with the suggesed code by doing the following:

set u m 2
set d n www.reefangel.com
set i h 198.171.134.6
set i r 80
save
reboot

I've installed the TeraTerm app but when I try to connect to the Wifi module via wifi (using telnet and port 2000) the program closes immediately. If I try to do it via USB, using the proper COM port, nothing happens at all (can't type).

THanks again for your amazing support :D

Re: Sketch Too big ?! Help please

Posted: Sun Jun 05, 2011 12:27 pm
by rimai
Through telnet, you will have problems with the timeout connection ending if idle for 1 or 3 secs.
Best is COM port. Read the manual. It gives you instructions on entering command mode, which is simply typing $$$

Re: Sketch Too big ?! Help please

Posted: Sun Jun 05, 2011 1:20 pm
by astralmind
rimai wrote:Through telnet, you will have problems with the timeout connection ending if idle for 1 or 3 secs.
Best is COM port. Read the manual. It gives you instructions on entering command mode, which is simply typing $$$
I did try via the USB cable following the exact steps from the manual but I am not getting any info from the terminal when connecting the wifi module, only random garbage characters each time the led blinks orange. I can't type anything.

ßã´Á¼oýë¼Y<–ýã´ág‹¾ã¼á<–ýã¼Á¼oýzÝô›ÛMÿk¼Á<–ý/žÙ-ö´ïkœÙ-ö´ïã´ávo/ýzÙô››Mÿ

tried reinstalling the software on 2 PCs (WinXP and 7) and same result. The Wifi module was properly configured as I can get it to communication with Client Suite without any issue.

Re: Sketch Too big ?! Help please

Posted: Sun Jun 05, 2011 1:42 pm
by rimai
Because you already used the wifi setup code, the baud rate has been changed to 57600.
Originally it was 9600.

Re: Sketch Too big ?! Help please

Posted: Sun Jun 05, 2011 2:20 pm
by astralmind
rimai wrote:Because you already used the wifi setup code, the baud rate has been changed to 57600.
Originally it was 9600.
this did solve the connection issue thank you. Solved

Re: Sketch Too big ?! Help please

Posted: Sun Jun 05, 2011 3:08 pm
by rimai
What do you mean with your IP gets broadcasted?
Can you paste what it says?

Re: Sketch Too big ?! Help please

Posted: Sun Jun 05, 2011 4:26 pm
by astralmind
rimai wrote:What do you mean with your IP gets broadcasted?
Can you paste what it says?
Sorry Roberto, I edited my comment while you were replying. The issue was that I still had Client Suite's services running in the background pinging the module. Turned them off and all worked great.

Now the other issue has to do with Reversing the ATO command. Alexwbush on had already started a thread on this very same topic and I found a temporary "solution". If you could have a look and comment that'd be fantastic. Grazie mille Roberto!