Day night mode for wave maker


Posts: 28
Joined: Thu Jan 02, 2014 1:02 pm
PostPosted: Sat Apr 05, 2014 8:15 am
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.

Posts: 12200
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat Apr 05, 2014 8:21 am
I'm assuming you are talking about Jebao, right?
Can you post your code?
Roberto.

Posts: 28
Joined: Thu Jan 02, 2014 1:02 pm
PostPosted: Sat Apr 05, 2014 12:22 pm
Hi Roberto,

Yes i am.

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

Posts: 28
Joined: Thu Jan 02, 2014 1:02 pm
PostPosted: Mon Apr 14, 2014 9:29 am
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();
}

Posts: 12200
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Apr 14, 2014 5:11 pm
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();
}
Roberto.

Posts: 28
Joined: Thu Jan 02, 2014 1:02 pm
PostPosted: Tue Apr 15, 2014 10:40 am
Thank you Roberto. Works perfectly

Posts: 8
Joined: Tue Apr 21, 2015 5:03 am
Location: AUSTRALIA
PostPosted: Sat Jul 30, 2016 12:15 am
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
User avatar
Posts: 5343
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sat Jul 30, 2016 3:26 pm
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.

Return to Ask anything here

Who is online

Users browsing this forum: No registered users and 2 guests

cron