Code for 2 Jebao wavemakers

Do you have a question on how to do something.
Ask in here.
Post Reply
lion-clown
Posts: 38
Joined: Wed Feb 19, 2014 4:47 am

Code for 2 Jebao wavemakers

Post 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?
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Code for 2 Jebao wavemakers

Post by cosmith71 »

Post your code and we can help. Are you using the actinic and daylight dimming ports?

--Colin
lion-clown
Posts: 38
Joined: Wed Feb 19, 2014 4:47 am

Re: Code for 2 Jebao wavemakers

Post 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();
}
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Code for 2 Jebao wavemakers

Post 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.
lion-clown
Posts: 38
Joined: Wed Feb 19, 2014 4:47 am

Re: Code for 2 Jebao wavemakers

Post 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.
Image
lion-clown
Posts: 38
Joined: Wed Feb 19, 2014 4:47 am

Re: Code for 2 Jebao wavemakers

Post by lion-clown »

Do I want to sync it or have it opposite of the other one so that it doesn't clash?
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Code for 2 Jebao wavemakers

Post 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.
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Code for 2 Jebao wavemakers

Post by cosmith71 »

Want one Sync and one AntiSync so they are complimentary.
lion-clown
Posts: 38
Joined: Wed Feb 19, 2014 4:47 am

Re: Code for 2 Jebao wavemakers

Post 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 );
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Code for 2 Jebao wavemakers

Post 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
Post Reply