Need a quick check of my code plz

New members questions
Post Reply
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Need a quick check of my code plz

Post by lnevo »

You could also use this:

Code: Select all

ReefAngel.DosingPumpRepeat(Port8,0,60,25);
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Need a quick check of my code plz

Post by rimai »

lnevo wrote:You could also use this:

Code: Select all

ReefAngel.DosingPumpRepeat(Port8,0,60,25);
Nice :mrgreen:
Roberto.
mason dixon
Posts: 26
Joined: Mon May 14, 2012 6:19 am

Re: Need a quick check of my code plz

Post by mason dixon »

Hi Roberto,

I'm redoing a bunch of stuff and started over with the wizard. When I went to compile it, this error message popped up

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.Use2014Screen();  // Let's use 2014 Screen 
    ReefAngel.AddPHExpansion();  // pH Expansion Module
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port5Bit;
    ReefAngel.FeedingModePortsE[0] = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port5Bit | Port6Bit;
    ReefAngel.WaterChangePortsE[0] = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
    ReefAngel.LightsOnPortsE[0] = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port3Bit | Port4Bit;
    ReefAngel.OverheatShutoffPortsE[0] = 0;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 874 );

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on
    ReefAngel.Relay.On( Port6 );
    ReefAngel.Relay.On( Port7 );

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

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

void loop()
{
    ReefAngel.StandardLights( Port1,12,0,22,0 );
    ReefAngel.StandardLights( Port2,13,0,20,0 );
    ReefAngel.StandardHeater( Port3,760,770 );
    ReefAngel.StandardHeater( Port4,760,770 );
    ReefAngel.StandardLights( Port5,0,0,21,0 );
    ReefAngel.DCPump.UseMemory = false;
    ReefAngel.DCPump.SetMode( Constant,50,10 );
    ReefAngel.DCPump.DaylightChannel = None;
    ReefAngel.DCPump.ActinicChannel = None;
    ////// Place your custom code below here
    

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

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


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

Re: Need a quick check of my code plz

Post by rimai »

Do you have the relay expansion module?
Roberto.
mason dixon
Posts: 26
Joined: Mon May 14, 2012 6:19 am

Re: Need a quick check of my code plz

Post by mason dixon »

I've just got the main relay box with the 8 outlets actually
Last edited by mason dixon on Fri Mar 07, 2014 1:42 pm, edited 1 time in total.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Need a quick check of my code plz

Post by rimai »

You must assign a function to at least one of the ports in the relay expansion.
Roberto.
mason dixon
Posts: 26
Joined: Mon May 14, 2012 6:19 am

Re: Need a quick check of my code plz

Post by mason dixon »

The wizard doesn't have a way to select that I'm not using an expansion relay box. I only have the main relay box that came with the reefangel.
mason dixon
Posts: 26
Joined: Mon May 14, 2012 6:19 am

Re: Need a quick check of my code plz

Post by mason dixon »

I figured it out, had expansion selected at the beginning of setup, sorry I'm a doofus
Post Reply