Is this file really too big?

Do you have a question on how to do something.
Ask in here.
Post Reply
ryanmell
Posts: 51
Joined: Tue Jan 24, 2012 7:28 am

Is this file really too big?

Post by ryanmell »

So I compiled a new file for my reefangel with the wizard, Is this file really too big or am I doing something wrong. I just have the standard reefangel

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

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


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

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


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

void loop()
{
ReefAngel.SingleATO( false,Port1,128,0 );
ReefAngel.StandardLights( Port2,9,0,21,0 );
ReefAngel.StandardLights( Port3,10,0,20,0 );
ReefAngel.StandardLights( Port5,9,0,21,0 );
ReefAngel.Wavemaker( Port6,60 );
ReefAngel.StandardHeater( Port7,751,761 );
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( TidalSwell,50,10 );
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( "ryanmell" );
ReefAngel.ShowInterface();
}
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Is this file really too big?

Post by rossbryant1956 »

save your file, close and restart arduino, try again. Arduino tends to hold things in memory causing a problem like this. Not saying this file is NOT too big, just something to try.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Is this file really too big?

Post by Sacohen »

Do you have the RS or the RA+?
If you have the RA chances are very good that the file is too big.
The new libraries have a lot in there and it does not leave you much room for your code.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Is this file really too big?

Post by lnevo »

The DCPump class is very large. You could remove it and use the PWM functions directly to control your pumps.
ryanmell
Posts: 51
Joined: Tue Jan 24, 2012 7:28 am

Re: Is this file really too big?

Post by ryanmell »

how do I use the PWM functions directly to control my pumps, can I use like crest mode and all of that?
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Is this file really too big?

Post by Sacohen »

The wave patterns are in this thread that Roberto created.

http://forum.reefangel.com/viewtopic.ph ... wave+modes

The way you would code Long Pulse on the Daylight Dimming Channel is like this..

ReefAngel.PWM.SetDaylight( LongPulseMode(45,70,10,true));

This is a minimum speed of 45% and maximum speed of 70% with a 10 second duration and the pumps in sync if you had multiple pumps.

Long Pulse
PulseMinSpeed - % for minimal speed
PulseMaxSpeed - % for maximum speed
PulseDuration - Duration (seconds) in which each pulse will be held. The pump will stay at minimal speed for PulseDuration and will stay at maximum speed for PulseDuration.
PulseSync - true if you want to sync pumps to same cycle. one false and one true if you want to anti-sync pumps.
ryanmell
Posts: 51
Joined: Tue Jan 24, 2012 7:28 am

Re: Is this file really too big?

Post by ryanmell »

awesome thanks for the info maybe a little more research on my part and I would have found it
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Is this file really too big?

Post by Sacohen »

It's kind of hard to find. I just knew about it because I stumbled on it a while back.
Good luck with it.
Post Reply