I'm sure you've heard it all before but here's my story:
I've had my RA for a little over 2 years (Back before the Plus was available) and been running my lights on just the standard timed outlets.
Well I got bored over the weekend so I re-wired my light fixture with new drivers so I could PWM dim my lights. Unfortunately when I went through the wizard and re-built my code with the Dimming controls in it couldn't upload saying the sketch was too large. Took the Dimming out again and had no problems. I was running the 1.1.0 lib so i eventually downgraded my lib to 1.0.7 and got the sketch to upload. So I've got it working but the WiFi just doesn't seem as stable on 1.0.7 and the Direct web login to my controller doesn't work anymore when it did on 1.1.0.
Suggestions to get my code down to size on 1.1.0 and keep my PWM control?
Sketch too large with PWM Controlls
-
- Posts: 16
- Joined: Fri Mar 02, 2012 10:27 am
Re: Sketch too large with PWM Controlls
Here's the code that works with 1.0.7
I also tried versions with variables in the code but had the same issue. Only difference is lib version and it fits with 1.0.7 and now with 1.1.0
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 = Port3Bit | Port4Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port3Bit | Port4Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port7Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port4Bit | Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Ports that are always on
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.DayLights( Port1 );
ReefAngel.ActinicLights( Port2 );
ReefAngel.StandardATO( Port3 );
ReefAngel.Relay.DelayedOn( Port4 );
ReefAngel.StandardHeater( Port6 );
ReefAngel.PWM.DaylightPWMParabola();
ReefAngel.PWM.ActinicPWMSlope();
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "pyroboy1der" );
ReefAngel.ShowInterface();
}
I also tried versions with variables in the code but had the same issue. Only difference is lib version and it fits with 1.0.7 and now with 1.1.0
Re: Sketch too large with PWM Controlls
Your code is about as compact as it gets. My suggestion is stick with 1.0.7