RA Wizard - No Night Mode?

Would you like to help?
Share your walkthrough tutorial with others

Posts: 17
Joined: Mon Dec 09, 2013 8:08 am
PostPosted: Sat Jan 11, 2014 6:38 am
Newbie here.
While setting up the Reef Angel Wizard, I realized there are no settings for the night mode and that means the wave makers will be running at full speed at night.
Am I missing something?

Posts: 234
Joined: Tue Nov 05, 2013 8:40 am
Location: Houston TX
PostPosted: Sat Jan 11, 2014 7:20 am
The Wizard is just a way to get you started with the basic functions. You can create custom coding if you want to run a different pattern at night.
Image

Posts: 17
Joined: Mon Dec 09, 2013 8:08 am
PostPosted: Sat Jan 11, 2014 8:32 am
Is there a "newbie-friendly" way to make that adjustment.
I don't know much about coding at this point.

Posts: 234
Joined: Tue Nov 05, 2013 8:40 am
Location: Houston TX
PostPosted: Sat Jan 11, 2014 8:41 am
Can you copy and paste the code you are using. The code the Wizard generates for you at the end.

paste it inbetween [ code] paste it here [ /code] without the spaces in the brackets.
Image

Posts: 17
Joined: Mon Dec 09, 2013 8:08 am
PostPosted: Sat Jan 11, 2014 9:15 am
#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
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port3Bit | Port5Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port5Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 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( 840 );

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


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

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

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

void loop()
{
    ReefAngel.Relay.DelayedOn( Port2,15 );
    ReefAngel.Wavemaker( Port5,120 );
    ReefAngel.DCPump.UseMemory = false;
    ReefAngel.DCPump.SetMode( LongPulse,100,60 );
    ReefAngel.DCPump.DaylightChannel = AntiSync;
    ReefAngel.DCPump.ActinicChannel = Sync;
    ////// Place your custom code below here
    

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

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




Posts: 234
Joined: Tue Nov 05, 2013 8:40 am
Location: Houston TX
PostPosted: Sat Jan 11, 2014 9:18 am
Are you trying to keep the longpulse mode at a lower speed or change to a constant low speed at night?
Image

Posts: 234
Joined: Tue Nov 05, 2013 8:40 am
Location: Houston TX
PostPosted: Sat Jan 11, 2014 9:38 am
Lets say you want to set Longpulse during the day and constant mode at night

In your void loop()
remove this line
Code: Select all
ReefAngel.DCPump.SetMode( LongPulse,100,60 );


then in the void loop() custom code area put this

Code: Select all
  if (hour()>=22 || hour()<11) { // if hour is >=10pm or hour is <11am 
    ReefAngel.DCPump.SetMode( Constant,30,10 ); // Set dc pump mode to Constant at 30% power
  }
  else if (hour()>=11 && hour()<22) { // if hour is >=11am and <10pm
  ReefAngel.DCPump.SetMode( LongPulse,100,60 ); // Set dc pump mode to LongPulse at 100% power, 60 second duration
  }



So this would be your new code
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
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port3Bit | Port5Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port5Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 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( 840 );

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


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

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

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

void loop()
{
    ReefAngel.Relay.DelayedOn( Port2,15 );
    ReefAngel.Wavemaker( Port5,120 );
    ReefAngel.DCPump.UseMemory = false;
    ReefAngel.DCPump.DaylightChannel = AntiSync;
    ReefAngel.DCPump.ActinicChannel = Sync;
    ////// Place your custom code below here
   
   
  if (hour()>=22 || hour()<11) { // if hour is >=10pm or hour is <11am 
    ReefAngel.DCPump.SetMode( Constant,30,10 ); // Set dc pump mode to Constant at 30% power
  }
  else if (hour()>=11 && hour()<22) { // if hour is >=11am and <10pm
    ReefAngel.DCPump.SetMode( LongPulse,100,60 ); // Set dc pump mode to LongPulse at 100% power, 60 second duration
  }
   

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

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

Posts: 17
Joined: Mon Dec 09, 2013 8:08 am
PostPosted: Sat Jan 11, 2014 10:49 am
Awesome and thanks for making it look so easy.
Do I remove the original code or just copy and paste the new code?

Posts: 234
Joined: Tue Nov 05, 2013 8:40 am
Location: Houston TX
PostPosted: Sat Jan 11, 2014 10:56 am
I gave you the option to edit your code or just replace it all together :)
Image

Posts: 17
Joined: Mon Dec 09, 2013 8:08 am
PostPosted: Sat Jan 11, 2014 11:01 am
What would be a good place for someone like me to learn how to code.
Thanks again for all your help and time.
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests