Page 1 of 1

Day night mode for wave maker

Posted: Sat Apr 05, 2014 8:15 am
by Ferdi
Hi there,

I want to let my wave maker go slower at night.

Is there any coding that can let it flow normaly during the day and slower at night?

Thank you in advance.

Re: Day night mode for wave maker

Posted: Sat Apr 05, 2014 8:21 am
by rimai
I'm assuming you are talking about Jebao, right?
Can you post your code?

Re: Day night mode for wave maker

Posted: Sat Apr 05, 2014 12:22 pm
by Ferdi
Hi Roberto,

Yes i am.

I'm looking for the code. Hehe 8-)

Re: Day night mode for wave maker

Posted: Mon Apr 14, 2014 9:29 am
by Ferdi
rimai wrote:I'm assuming you are talking about Jebao, right?
Can you post your code?

#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 = Port2Bit | Port3Bit | Port5Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port5Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port3Bit | Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 290 );

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


// Ports that are always on
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port8 );

////// Place additional initialization code below here
ReefAngel.CustomLabels[0]="Heater";
ReefAngel.CustomLabels[1]="Wave Maker";
ReefAngel.CustomLabels[2]="Skimmer";
ReefAngel.CustomLabels[3]="Reactor";
ReefAngel.CustomLabels[4]="ATO";
ReefAngel.CustomLabels[5]="Lights";
ReefAngel.CustomLabels[6]="Chiller";
ReefAngel.CustomLabels[7]="ReturnPump";


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

void loop()
{
ReefAngel.StandardHeater( Port1,265,270 );
ReefAngel.Relay.DelayedOn( Port3,4 );
ReefAngel.SingleATO( true,Port5,60,0 );
ReefAngel.StandardFan( Port7,270,275 );
ReefAngel.PWM.SetActinic( MoonPhase() );
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( ShortPulse,40,40 );
ReefAngel.DCPump.DaylightChannel = Sync;
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( "Ferdi" );
ReefAngel.ShowInterface();
}

Re: Day night mode for wave maker

Posted: Mon Apr 14, 2014 5:11 pm
by rimai
Try this:

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 = Port2Bit | Port3Bit | Port5Bit | Port8Bit;
  // Ports toggled in Water Change Mode
  ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port5Bit | Port8Bit;
  // Ports toggled when Lights On / Off menu entry selected
  ReefAngel.LightsOnPorts = 0;
  // Ports turned off when Overheat temperature exceeded
  ReefAngel.OverheatShutoffPorts = Port1Bit | Port3Bit | Port6Bit;
  // Use T1 probe as temperature and overheat functions
  ReefAngel.TempProbe = T1_PROBE;
  ReefAngel.OverheatProbe = T1_PROBE;
  // Set the Overheat temperature setting
  InternalMemory.OverheatTemp_write( 290 );

  // Feeeding and Water Change mode speed
  ReefAngel.DCPump.FeedingSpeed=0;
  ReefAngel.DCPump.WaterChangeSpeed=0;
  ReefAngel.DCPump.UseMemory = false;
  ReefAngel.DCPump.DaylightChannel = Sync;
  ReefAngel.DCPump.ActinicChannel = None;


  // Ports that are always on
  ReefAngel.Relay.On( Port2 );
  ReefAngel.Relay.On( Port4 );
  ReefAngel.Relay.On( Port6 );
  ReefAngel.Relay.On( Port8 );

  ////// Place additional initialization code below here
  ReefAngel.CustomLabels[0]="Heater";
  ReefAngel.CustomLabels[1]="Wave Maker";
  ReefAngel.CustomLabels[2]="Skimmer";
  ReefAngel.CustomLabels[3]="Reactor";
  ReefAngel.CustomLabels[4]="ATO";
  ReefAngel.CustomLabels[5]="Lights";
  ReefAngel.CustomLabels[6]="Chiller";
  ReefAngel.CustomLabels[7]="ReturnPump"; 


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

void loop()
{
  ReefAngel.StandardHeater( Port1,265,270 );
  ReefAngel.Relay.DelayedOn( Port3,4 );
  ReefAngel.SingleATO( true,Port5,60,0 );
  ReefAngel.StandardFan( Port7,270,275 );
  ReefAngel.PWM.SetActinic( MoonPhase() );
  if (hour()>=8 && hour()<18) // Day mode between 8am and 6pm
  {
    ReefAngel.DCPump.SetMode( ShortPulse,40,40 );
  }
  else
    ReefAngel.DCPump.SetMode( Constant,30,0 );
  
  ////// Place your custom code below here


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

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

Re: Day night mode for wave maker

Posted: Tue Apr 15, 2014 10:40 am
by Ferdi
Thank you Roberto. Works perfectly

Re: Day night mode for wave maker

Posted: Sat Jul 30, 2016 12:15 am
by GreenVF
With this code can you adjust the wave makers from the portal or is it just hard coded?

I would like to have night mode and day mode with Jeboa wave makers.

Is someone able to post code on how this is done. Thanks

Re: Day night mode for wave maker

Posted: Sat Jul 30, 2016 3:26 pm
by lnevo
This is hard coded. The best way to do this is to wrape the whole section that is setting the different modes with an if that checks the mode setting in memory and only runs the schedule if the mode is Custom. If not it will use settings in memory.