RANet relay expansion not working
Posted: Sun Dec 21, 2014 9:52 am
I tried to hook up my ranet relay expansion today. None of the outlet seems to work. Even when I set them to always on. I flipped the 1st switch on. 2 and 3 are off on the side. Also, there are 2 ports that I cant plug anything in to because the copper inside is bent. Is this fixable?
here is my code:
here is my code:
Code: Select all
#include <SoftwareSerial.h>
#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 <PAR.h>
#include <ReefAngel.h>
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
InternalMemory.LCDID_write(255);
ReefAngel.Init(); //Initialize controller
ReefAngel.AddRANet(); // RANet Add-On Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
ReefAngel.FeedingModePortsE[0] = Port3Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port2Bit | Port4Bit;
ReefAngel.WaterChangePortsE[0] = Port3Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port2Bit;
ReefAngel.LightsOnPortsE[0] = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port5Bit;
ReefAngel.OverheatShutoffPortsE[0] = Port1Bit | Port2Bit | Port3Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Ports that are always on
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Box1_Port1 );
ReefAngel.Relay.On( Box1_Port7 );
ReefAngel.Relay.On( Box1_Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardFan( Port1 );
ReefAngel.DayLights( Port2 );
ReefAngel.StandardHeater( Port3 );
ReefAngel.StandardATO( Port4 );
ReefAngel.Relay.DelayedOn( Port5 );
ReefAngel.DosingPumpRepeat1( Port7 );
ReefAngel.DosingPumpRepeat2( Port8 );
ReefAngel.Relay.Set( Box1_Port2, !ReefAngel.Relay.Status( Port2 ) );
ReefAngel.DayLights( Box1_Port3 );
ReefAngel.DayLights( Box1_Port4 );
ReefAngel.PWM.DaylightPWMParabola();
ReefAngel.PWM.ActinicPWMParabola();
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "grafxalien" );
ReefAngel.ShowInterface();
}