Page 1 of 1
Code for 2 Jebao wavemakers
Posted: Sat Jan 24, 2015 3:01 pm
by lion-clown
I just my second cable for a Jebao wave-maker and want to add the second one on the opposite side of the tank. I know it is on this site somewhere but just can't seem to find it. What code do I use?
Also is there a list of all the different types of wave functions for these wave-makers?
Re: Code for 2 Jebao wavemakers
Posted: Sat Jan 24, 2015 4:43 pm
by cosmith71
Post your code and we can help. Are you using the actinic and daylight dimming ports?
--Colin
Re: Code for 2 Jebao wavemakers
Posted: Sat Jan 24, 2015 4:56 pm
by lion-clown
I think this is the one I'm using. My last computer crashed and I haven't changed the code since but I'm trying to get back into it and change up the 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 = Port8Bit;
ReefAngel.FeedingModePortsE[0] = Port3Bit | Port5Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port8Bit;
ReefAngel.WaterChangePortsE[0] = Port1Bit | Port3Bit | Port4Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
ReefAngel.LightsOnPortsE[0] = Port2Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port5Bit;
ReefAngel.OverheatShutoffPortsE[0] = Port1Bit;
// Ports turned off when Leak is detected
ReefAngel.LeakShutoffPorts = 0;
ReefAngel.LeakShutoffPortsE[0] = 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( 810 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port8 );
ReefAngel.Relay.On( Box1_Port3 );
ReefAngel.Relay.On( Box1_Port4 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port1,10,30,22,0 );
ReefAngel.StandardLights( Port2,10,30,22,0 );
ReefAngel.StandardLights( Port3,10,0,22,30 );
ReefAngel.StandardLights( Port4,10,0,22,30 );
ReefAngel.StandardHeater( Port5,787,792 );
ReefAngel.StandardLights( Port7,10,0,23,0 );
ReefAngel.StandardFan( Box1_Port1,795,798 );
ReefAngel.StandardLights( Box1_Port2,22,0,10,30 );
ReefAngel.WavemakerRandom( Box1_Port5,55,100 );
ReefAngel.StandardFan( Box1_Port7,795,799 );
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( ReefCrest,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( "lion-clown" );
ReefAngel.ShowInterface();
}
Re: Code for 2 Jebao wavemakers
Posted: Sat Jan 24, 2015 5:03 pm
by cosmith71
You could do 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.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port8Bit;
ReefAngel.FeedingModePortsE[0] = Port3Bit | Port5Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port8Bit;
ReefAngel.WaterChangePortsE[0] = Port1Bit | Port3Bit | Port4Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
ReefAngel.LightsOnPortsE[0] = Port2Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port5Bit;
ReefAngel.OverheatShutoffPortsE[0] = Port1Bit;
// Ports turned off when Leak is detected
ReefAngel.LeakShutoffPorts = 0;
ReefAngel.LeakShutoffPortsE[0] = 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( 810 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port8 );
ReefAngel.Relay.On( Box1_Port3 );
ReefAngel.Relay.On( Box1_Port4 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port1,10,30,22,0 );
ReefAngel.StandardLights( Port2,10,30,22,0 );
ReefAngel.StandardLights( Port3,10,0,22,30 );
ReefAngel.StandardLights( Port4,10,0,22,30 );
ReefAngel.StandardHeater( Port5,787,792 );
ReefAngel.StandardLights( Port7,10,0,23,0 );
ReefAngel.StandardFan( Box1_Port1,795,798 );
ReefAngel.StandardLights( Box1_Port2,22,0,10,30 );
ReefAngel.WavemakerRandom( Box1_Port5,55,100 );
ReefAngel.StandardFan( Box1_Port7,795,799 );
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( ReefCrest,50,10 );
ReefAngel.DCPump.DaylightChannel = Sync;
ReefAngel.DCPump.ActinicChannel = AntiSync;
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "lion-clown" );
ReefAngel.ShowInterface();
}
Do you have the WiFi module? It's easy to set up so you can change modes on the Portal and see what they're like. I'm not sure a master list of modes exists, but it certainly needs to.
Re: Code for 2 Jebao wavemakers
Posted: Sat Jan 24, 2015 5:09 pm
by lion-clown
Yeah I have the WIFI but what do you mean by change modes on the portal?
Do you know some different ones I could try? I'm trying to make it more of a wave.
Re: Code for 2 Jebao wavemakers
Posted: Sat Jan 24, 2015 5:14 pm
by lion-clown
Do I want to sync it or have it opposite of the other one so that it doesn't clash?
Re: Code for 2 Jebao wavemakers
Posted: Sat Jan 24, 2015 5:19 pm
by cosmith71
Try this 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 = Port8Bit;
ReefAngel.FeedingModePortsE[0] = Port3Bit | Port5Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port8Bit;
ReefAngel.WaterChangePortsE[0] = Port1Bit | Port3Bit | Port4Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
ReefAngel.LightsOnPortsE[0] = Port2Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port5Bit;
ReefAngel.OverheatShutoffPortsE[0] = Port1Bit;
// Ports turned off when Leak is detected
ReefAngel.LeakShutoffPorts = 0;
ReefAngel.LeakShutoffPortsE[0] = 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( 810 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port8 );
ReefAngel.Relay.On( Box1_Port3 );
ReefAngel.Relay.On( Box1_Port4 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port1,10,30,22,0 );
ReefAngel.StandardLights( Port2,10,30,22,0 );
ReefAngel.StandardLights( Port3,10,0,22,30 );
ReefAngel.StandardLights( Port4,10,0,22,30 );
ReefAngel.StandardHeater( Port5,787,792 );
ReefAngel.StandardLights( Port7,10,0,23,0 );
ReefAngel.StandardFan( Box1_Port1,795,798 );
ReefAngel.StandardLights( Box1_Port2,22,0,10,30 );
ReefAngel.WavemakerRandom( Box1_Port5,55,100 );
ReefAngel.StandardFan( Box1_Port7,795,799 );
ReefAngel.DCPump.UseMemory = true;
ReefAngel.DCPump.DaylightChannel = Sync;
ReefAngel.DCPump.ActinicChannel = AntiSync;
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "lion-clown" );
ReefAngel.ShowInterface();
}
If you go onto the Portal, click on "Internal Memory" and "DC Pump" and you'll see the available modes.
Re: Code for 2 Jebao wavemakers
Posted: Sat Jan 24, 2015 5:19 pm
by cosmith71
Want one Sync and one AntiSync so they are complimentary.
Re: Code for 2 Jebao wavemakers
Posted: Sat Jan 24, 2015 10:09 pm
by lion-clown
What does this line/#s control:
ReefAngel.WavemakerRandom( Box1_Port5,55,100 );
And what does this line/#s control:
ReefAngel.DCPump.SetMode( Sine,35,12 );
Re: Code for 2 Jebao wavemakers
Posted: Sun Jan 25, 2015 8:12 am
by cosmith71
Code: Select all
ReefAngel.WavemakerRandom( Box1_Port5,55,100 );
That's the old wavemaker function for use with simple powerheads. It basically just switches the outlet on and off like a timer. Don't use it with the Jebaos.
Code: Select all
ReefAngel.DCPump.SetMode( Sine,35,12 );
That sets the pumps to Sine mode (basically a sine wave) with a top speed of 35 and a duration of 12 seconds. The bottom speed is 30 by default (WP's don't work well under 30).
--Colin