Cutting down to fit on the standard RA

Share you PDE file with our community
Post Reply
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Cutting down to fit on the standard RA

Post by alexwbush »

So I just moved and my RA+ is running my temp tank 6 hours away and I have my new tank setup on a RA standard. My new tank is much bigger (75 gallons... old tank ~30 gallons). I am running:

Standard thermometers
Standard pH
Salinity expansion
RF expansion (for radions)
Dosing pump expansion
2nd relay expansion
wifi

Is this just a pipe dream? I'd like to keep functionality of it all :lol: I guess I'll have to start cutting things down.

Here is my current code:

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 <ReefAngel.h>

// Initialize Buzzer variables
byte buzzer=0;
byte overheatflag=0;
byte atoflag=0;

////// 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 = Port4Bit | Port7Bit | Port8Bit;
    ReefAngel.FeedingModePortsE[0] = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port3Bit | Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
    ReefAngel.WaterChangePortsE[0] = Port2Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
    ReefAngel.LightsOnPortsE[0] = Port1Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit | Port3Bit | Port7Bit;
    ReefAngel.OverheatShutoffPortsE[0] = 0;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;


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

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

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

void loop()
{
    ReefAngel.StandardHeater( Port3 );
    ReefAngel.DosingPumpRepeat1( Port5 );
    ReefAngel.DosingPumpRepeat2( Port6 );
    ReefAngel.Relay.DelayedOn( Port7 );
    ReefAngel.Relay.Set( Box1_Port1, !ReefAngel.Relay.Status( Port8 ) );
    ReefAngel.SingleATOLow( Box1_Port2 );
    ReefAngel.RF.ChannelWhiteParabola();
    ReefAngel.RF.ChannelRoyalBlueParabola();
    ReefAngel.RF.ChannelRedParabola();
    ReefAngel.RF.ChannelGreenParabola();
    ReefAngel.RF.SetChannel( Radion_Blue, MoonPhase() );
    ReefAngel.RF.ChannelIntensityParabola();
    if ( second()==0 ) ReefAngel.RF.RadionWrite();

    overheatflag = InternalMemory.read( Overheat_Exceed_Flag );
    atoflag = InternalMemory.read( ATO_Exceed_Flag );
    buzzer = overheatflag + atoflag;
    if ( buzzer >= 1 ) buzzer = 100;
    ReefAngel.PWM.SetDaylight( buzzer );

    ////// Place your custom code below here
    

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

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

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 14, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 14, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // Salinity
    ReefAngel.LCD.DrawText( COLOR_DARKKHAKI,DefaultBGColor,15,54, "SAL:" );
    ReefAngel.LCD.DrawText( COLOR_DARKKHAKI,DefaultBGColor,39,54, ReefAngel.Params.Salinity );
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 76, TempRelay );
    pingSerial();

    // Relay Expansion
    TempRelay = ReefAngel.Relay.RelayDataE[0];
    TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
    TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
    ReefAngel.LCD.DrawOutletBox( 12, 98, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: Cutting down to fit on the standard RA

Post by alexwbush »

well, I removed the RF module in the wizard and that fit... any ideas that might get me running with it until I get my RA+ back?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Cutting down to fit on the standard RA

Post by rimai »

:(
I'm afraid it is going to be too much for the standard RA :(
Roberto.
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: Cutting down to fit on the standard RA

Post by alexwbush »

rimai wrote::(
I'm afraid it is going to be too much for the standard RA :(
say it aint so! That's ok, I should have my RA+ in the next couple months. I can let the radions run the ecotech light cycle for now.
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: Cutting down to fit on the standard RA

Post by alexwbush »

Roberto,
My original RA board won't work with the expansion modules, will they? I remember having to play with jumpers, but I think maybe that was on the second board.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Cutting down to fit on the standard RA

Post by rimai »

If you got jumpers you can
Roberto.
Post Reply