Page 1 of 1

Power Expansion Module

Posted: Thu Oct 06, 2016 8:24 pm
by ecam
Here is my code. i need to add a power expansion module to my reef angel. I dont see the module as an option on my menu. and i want to setup so i can run my dosers off of it... Any help will be appreciate ... especially from @lnevo and @rimai...
Thanks in advance

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 <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
    ReefAngel.Init();  //Initialize controller
    ReefAngel.AddStandardMenu();  // Add Standard Menu

    ReefAngel.Use2014Screen();  // Let's use 2014 Screen 
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port1Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit | Port3Bit | 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( 805 );


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

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

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

void loop()
{
    ReefAngel.SingleATO( true,Port2,90,0 );
    ReefAngel.StandardHeater( Port3,770,790 );
    ReefAngel.StandardHeater( Port4,770,790 );f
    ////// Place your custom code below here
    

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

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


Re: Power Expansion Module

Posted: Fri Oct 07, 2016 6:55 am
by cosmith71
It acts just like an expansion relay box. Just select expansion relay and program it as usual.

Re: Power Expansion Module

Posted: Fri Oct 07, 2016 12:08 pm
by ecam
Okay... so if it acts like an expansion relay? how do i know what order is 1-8.... also i cant access the library to execute the code to introduce to the reef angel... Any sample code would be most helpful

Re: Power Expansion Module

Posted: Fri Oct 07, 2016 12:30 pm
by cosmith71
I don't have one, but you should be able to use the Wizard to program it. Just select it as an expansion relay.

Looking at the schematics, it looks like if you hold it with the bus connection facing down, then 1-2 are on the right, 3-6 are on the top, and 7-8 are on the left.