Need help (first time set-up)

Post Reply
Nemesis
Posts: 7
Joined: Wed Oct 22, 2014 4:57 pm

Need help (first time set-up)

Post by Nemesis »

I followed all the steps and when I try to load it to the controller, I get sketh to big error message.

Here is my sketch:

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


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port8 );
ReefAngel.Relay.On( Box1_Port1 );
ReefAngel.Relay.On( Box1_Port3 );
ReefAngel.Relay.On( Box1_Port5 );
ReefAngel.Relay.On( Box1_Port6 );
ReefAngel.Relay.On( Box1_Port7 );

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


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

void loop()
{
ReefAngel.StandardLights( Port4,18,0,9,0 );
ReefAngel.CO2Control( Port7,830,800 );
ReefAngel.MHLights( Box1_Port2,10,0,17,0,2 );
ReefAngel.MHLights( Box1_Port4,10,0,17,0,2 );
////// Place your custom code below here


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

// This should always be the last line
ReefAngel.Portal( "Nemesis" );
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();

// pH Expansion
ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,15,54, "PHE:" );
ReefAngel.LCD.DrawSingleMonitor( ReefAngel.Params.PHExp,COLOR_MEDIUMSEAGREEN,39,54, 100 );
pingSerial();

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

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

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

void DrawCustomGraph()
{
ReefAngel.LCD.DrawGraph( 5, 5 );
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Need help (first time set-up)

Post by rimai »

Is this a new controller?
Roberto.
Nemesis
Posts: 7
Joined: Wed Oct 22, 2014 4:57 pm

Re: Need help (first time set-up)

Post by Nemesis »

No I got it from someone who was tearing down his tank.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Need help (first time set-up)

Post by rimai »

Is it a standard RA or a RA+??
You are going to have a hard time trying to fit all that code into the standard RA.
You may need to upgrade to a RA+.
Roberto.
Nemesis
Posts: 7
Joined: Wed Oct 22, 2014 4:57 pm

Re: Need help (first time set-up)

Post by Nemesis »

It's just a RA. Should I only use one relay box?
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Need help (first time set-up)

Post by cosmith71 »

Butting in. :D

You should upgrade to an RA+. It's well worth the $75. You'll be fighting memory problems forever with the regular RA board. There are just too many new features for it.

--Colin
Nemesis
Posts: 7
Joined: Wed Oct 22, 2014 4:57 pm

Re: Need help (first time set-up)

Post by Nemesis »

So I went ahead and removed one of the relay boxes and was able to download the code to the controller. My problem now is that outlets #2-#4-#6 and #7 do not work. I thought that I might have a bad relay box so I switched it with the other box and I still have the same problem. What am I doing wrong???
Here is the new code:

#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 | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port5Bit | Port6Bit | 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( 825 );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );
ReefAngel.Relay.On( Box1_Port1 );
ReefAngel.Relay.On( Box1_Port3 );
ReefAngel.Relay.On( Box1_Port5 );
ReefAngel.Relay.On( Box1_Port6 );
ReefAngel.Relay.On( Box1_Port7 );

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


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

void loop()
{
ReefAngel.MHLights( Port2,10,0,17,0,2 );
ReefAngel.CO2Control( Port3,681,678 );
ReefAngel.MHLights( Box1_Port2,10,0,17,0,2 );
ReefAngel.MHLights( Box1_Port4,10,0,17,0,2 );
////// Place your custom code below here


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

// This should always be the last line
ReefAngel.Portal( "Nemesis" );
ReefAngel.ShowInterface();
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Need help (first time set-up)

Post by rimai »

Is the svga cable the original one?
Roberto.
Nemesis
Posts: 7
Joined: Wed Oct 22, 2014 4:57 pm

Re: Need help (first time set-up)

Post by Nemesis »

It was not the same cord, so I switched it with the original cord and it works! I thought you could use any monitor cable? Thanks for all your help.
Nemesis
Posts: 7
Joined: Wed Oct 22, 2014 4:57 pm

Re: Need help (first time set-up)

Post by Nemesis »

I want to add my 2 Kessil 360a's to my controler. I'm going to upgrade to the RA+ ,what kind of cable do I need to use the dimming affect?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Need help (first time set-up)

Post by rimai »

There is a kessil cable in the webstore.
Roberto.
Nemesis
Posts: 7
Joined: Wed Oct 22, 2014 4:57 pm

Re: Need help (first time set-up)

Post by Nemesis »

Once I get these will I be able to use the wizard to program it? I read some of the other posts and it sounds like they had a hard time setting it up.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Need help (first time set-up)

Post by rimai »

Yeah, you can use the wizard.
Can you link the thread you are referring to?
Roberto.
Post Reply