Jebao/Speedwave cable and programming

Do you have a question on how to do something.
Ask in here.
Post Reply
Spotted
Posts: 101
Joined: Thu May 10, 2012 5:46 am
Location: Sunny (and hot) South Florida

Jebao/Speedwave cable and programming

Post by Spotted »

Ok, here what I would like to do. I have 2 WP 40s. I want to run 1 pump for 4 hours, then switch to the other for 4 hours and back and forth until like 10 PM. I have automated feeding times set up in the morning and at night time. When feeding mode ends I would like both powerheads to come on for a couple minutes in a nutrient transport mode. Then resume the 4/4 split. Can this be done?
I intend to add a dimming module and a 3rd powerhead later on down the road that I would like to throw into a 4/4/4 timing mix.
Here's my 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 = Port1Bit | Port3Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
    ReefAngel.FeedingModePortsE[0] = Port2Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port3Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
    ReefAngel.WaterChangePortsE[0] = Port2Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port2Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port3Bit | Port6Bit | Port7Bit | Port8Bit;
    ReefAngel.OverheatShutoffPortsE[0] = Port2Bit;
    // Use T3 probe as temperature and overheat functions
    ReefAngel.TempProbe = T3_PROBE;
    ReefAngel.OverheatProbe = T3_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 805 );


    // Ports that are always on
    ReefAngel.Relay.On( Port3 ); // Sump powerhead
    ReefAngel.Relay.On( Box1_Port1 ); // ATS air pump
    ReefAngel.Relay.On( Box1_Port2 ); // Media Reactors
    ReefAngel.Relay.On( Box1_Port8 ); // Display lights

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

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

void loop()
{
    ReefAngel.SingleATO( true,Port1,300,10 ); // ATO
    ReefAngel.StandardLights( Port5,6,0,22,0 ); //Powerheads on @ 6 AM off @ 10PM
    ReefAngel.StandardLights( Box1_Port4,0,0,9,0 ); //ATS LEDs on @ 12AM off at 9AM
    ReefAngel.StandardHeater( Port6,780,805 ); //Heater
    ReefAngel.Relay.DelayedOn( Port7,5 ); //Skimmer delayed on 5 minutes
    ReefAngel.Relay.DelayedOn( Port8,3 ); //Return pump delayed on 3 minutes
    ReefAngel.DosingPumpRepeat( Box1_Port3,0,60,170 ); //Aqualifter on every hour for 170 seconds

    ////// Place your custom code below here
    if ((now()%SECS_PER_DAY==31320)) //if it is 8:42 AM
    {ReefAngel.FeedingModeStart();} //START FEEDING MODE
    if ((now()%SECS_PER_DAY==67320)) //if it is 6:42 PM
    {ReefAngel.FeedingModeStart();} //START FEEDING MODE
    ////// Place your custom code above here

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



Image
Post Reply