Page 1 of 1

Problem wavemaker

Posted: Wed Nov 06, 2013 10:29 am
by marco3020
good evening since Arduino takes a shorter code ho.problema to alternate the pumps every 6 hours, using the wizard mi.da or random or constant in seconds, but I have to do 6 hours and a stop and then the next 6 hours and a stop and so on

Inviato dal mio GT-I9300 utilizzando Tapatalk

Re: Problem wavemaker

Posted: Wed Nov 06, 2013 2:09 pm
by marco3020
Up

Inviato dal mio GT-I9300 utilizzando Tapatalk

Re: Problem wavemaker

Posted: Wed Nov 06, 2013 2:10 pm
by marco3020
Help me

Inviato dal mio GT-I9300 utilizzando Tapatalk

Re: Problem wavemaker

Posted: Thu Nov 07, 2013 4:58 am
by marco3020
Help me please :(

Inviato dal mio GT-I9300 utilizzando Tapatalk

Re: Problem wavemaker

Posted: Thu Nov 07, 2013 5:01 am
by johniii
How long does it need to stop for. You want 6hrs on 6hrs off

Re: Problem wavemaker

Posted: Thu Nov 07, 2013 7:27 am
by marco3020
Thanks for taking my call I do not know how to get them to say to the reef angel do go a pump 6 hours and then stop her and go do the other 6 hours and stop her and then resumes

Re: Problem wavemaker

Posted: Thu Nov 07, 2013 7:48 am
by lnevo
ReefAngel.Relay.Set(Port5, now()%(12*SECS_PER_HOUR)<(6*SECS_PER_HOUR) );
ReefAngel.Relay.Set(Port6, now()%(12*SECS_PER_HOUR)>(6*SECS_PER_HOUR) );

now % (12 * SECS_PER_HOUR) means to divide the time by 12 hours and look at the remainder.. If it's less than 6 hours then one port will be on (Port 5). If it's greater than 6 hours the other port (Port 6)will be on.

Re: Problem wavemaker

Posted: Thu Nov 07, 2013 8:06 am
by marco3020
#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.AddDateTimeMenu();
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature

ReefAngel.AddStandardMenu(); // Add Standard Menu

ReefAngel.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port5Bit | Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port5Bit | Port6Bit | Port7Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 273 );


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

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


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

void loop()
{
ReefAngel.SingleATO( true,Port1,60,0 );
ReefAngel.StandardLights( Port2,8,0,17,0 );
ReefAngel.StandardHeater( Port3,251,261 );
ReefAngel.StandardFan( Port4,265,271 );
ReefAngel.Relay.Set(Port5, now()%(12*SECS_PER_HOUR)<(6*SECS_PER_HOUR) );
ReefAngel.Relay.Set(Port6, now()%(12*SECS_PER_HOUR)>(6*SECS_PER_HOUR) );
ReefAngel.Relay.DelayedOn( Port7,5 );
ReefAngel.PWM.SetDaylight( PWMSlope(8,0,17,0,5,15,60,5) );
ReefAngel.PWM.SetActinic( PWMSlope(8,0,17,0,5,70,60,5) );
////// Place your custom code below here


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

// This should always be the last line
ReefAngel.ShowInterface();


}

not fuction error uploading

Re: Problem wavemaker

Posted: Thu Nov 07, 2013 11:31 am
by lnevo
What is the error you are getting?