rimai wrote:No, it's not a fluke. That's the trade off on the standard RA. It has very limited memory and it costs less.
The problem is that the wifi codeset that just keeps increasing as we add more and more features.
If you remove the wifi, you will see how drastically your code will shrink.
Maybe we ought to have a minimalist version, but I just don't see what we could decrease in there.
I actually played around with it. Tried removing just the salinity expansion, then just the wifi attachment, and then removing both, and it still really didn't change much.
On 1.1.0 libraries, here are the sketch sizes:
With Salinity & wifi: 33,076 bytes
With Salinity (no wifi): 29,936 bytes
With Wifi (no salinity): 32,054 bytes
With neither: 29,060 bytes
Here is my full sketch if anyone is interested.
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 | Port2Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port3Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 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( 820 );
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port3,11,0,23,0 );
ReefAngel.DosingPumpRepeat( Port4,0,240,180 );
ReefAngel.PWM.SetDaylight( PWMParabola(11,0,23,0,1,70,1) );
ReefAngel.PWM.SetActinic( PWMParabola(11,0,23,0,1,70,1) );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "jedimasterben" );
ReefAngel.ShowInterface();
}
void DrawCustomMain()
{
int x,y;
char text[10];
// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();
// Salinity
ReefAngel.LCD.DrawText( COLOR_DARKKHAKI,DefaultBGColor,49,66, "SAL:" );
ReefAngel.LCD.DrawSingleMonitor( ReefAngel.Params.Salinity,COLOR_DARKKHAKI,73,66, 10 );
pingSerial();
// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 93, TempRelay );
pingSerial();
// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}
void DrawCustomGraph()
{
}
Monitoring salinity and having a way to check up on the controller via wifi are two very common things that I'd imagine are all that the 'average Joe' would want to do, but it seems that going forward, they cannot do that with the 'basic' controller version now. The page that goes through the 'basic vs plus' mentions that as more expansions are added that you will limited on adding them, but I think that just having the basic monitoring included with the RA and being limited to one expansion OR connecting via wifi may reduce the amount of people choosing the RA.
I also just made a sketch as if I also had added a calcium reactor, two wavemakers on random, and a chiller, and the sketch increased to 30,000 bytes, meaning that wifi could not be added at all. Just something to think about.