Relay Expansion Code Issues

Expansion modules and attachments
Post Reply
tanked_kiwi
Posts: 37
Joined: Thu May 22, 2014 3:25 am

Relay Expansion Code Issues

Post by tanked_kiwi »

Hi,

I've just tried to use the relay box expansion code and keep having an error when I compile. This happens even when I use some code generated by the wizard.

Example:

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
    ReefAngel.SetTemperatureUnit( Celsius );  // set to Celsius Temperature

    ReefAngel.Use2014Screen();  // Let's use 2014 Screen 
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port3Bit | Port5Bit | Port6Bit | Port8Bit;
    ReefAngel.FeedingModePortsE[0] = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port3Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
    ReefAngel.WaterChangePortsE[0] = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port2Bit | Port4Bit;
    ReefAngel.LightsOnPortsE[0] = Port1Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 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( Port6 );
    ReefAngel.Relay.On( Port8 );

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

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

void loop()
{
    ReefAngel.ActinicLights( Port2 );
    ReefAngel.ActinicLights( Port4 );
    ReefAngel.SingleATOLow( Port5 );
    ReefAngel.StandardHeater( Port7 );
    ReefAngel.PWM.DaylightPWMSlope();
    ReefAngel.PWM.ActinicPWMSlope();
    ReefAngel.PWM.Channel0PWMSlope();
    ReefAngel.PWM.Channel1PWMParabola();
    ReefAngel.PWM.Channel2PWMParabola();
    ReefAngel.PWM.Channel3PWMParabola();
    ////// Place your custom code below here
    

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

    // This should always be the last line
    ReefAngel.Portal( "tanked_kiwi" );
    ReefAngel.ShowInterface();
}
This Is what the compiler shows:

The following features were detected:
Dimming Signal
Wifi Attachment
Dimming Expansion Module
2014 Main Screen
Extra Font - Medium Size (8x8 pixels)
Simple Menu
sketch_jun22a.cpp: In function 'void setup()':
sketch_jun22a:46: error: 'class ReefAngelClass' has no member named 'FeedingModePortsE'
sketch_jun22a:49: error: 'class ReefAngelClass' has no member named 'WaterChangePortsE'
sketch_jun22a:52: error: 'class ReefAngelClass' has no member named 'LightsOnPortsE'
sketch_jun22a:55: error: 'class ReefAngelClass' has no member named 'OverheatShutoffPortsE'

Any Idea why this is happening?

Evan.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Relay Expansion Code Issues

Post by rimai »

You need to set a function to at least one port in the expansion box.
Roberto.
tanked_kiwi
Posts: 37
Joined: Thu May 22, 2014 3:25 am

Re: Relay Expansion Code Issues

Post by tanked_kiwi »

Gotcha, thanks
Post Reply