Problem wavemaker

Do you have a question on how to do something.
Ask in here.
Post Reply
marco3020
Posts: 75
Joined: Sun Feb 19, 2012 12:18 pm

Problem wavemaker

Post 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
marco3020
Posts: 75
Joined: Sun Feb 19, 2012 12:18 pm

Re: Problem wavemaker

Post by marco3020 »

Up

Inviato dal mio GT-I9300 utilizzando Tapatalk
marco3020
Posts: 75
Joined: Sun Feb 19, 2012 12:18 pm

Re: Problem wavemaker

Post by marco3020 »

Help me

Inviato dal mio GT-I9300 utilizzando Tapatalk
marco3020
Posts: 75
Joined: Sun Feb 19, 2012 12:18 pm

Re: Problem wavemaker

Post by marco3020 »

Help me please :(

Inviato dal mio GT-I9300 utilizzando Tapatalk
johniii
Posts: 86
Joined: Sun Mar 03, 2013 8:37 am

Re: Problem wavemaker

Post by johniii »

How long does it need to stop for. You want 6hrs on 6hrs off
marco3020
Posts: 75
Joined: Sun Feb 19, 2012 12:18 pm

Re: Problem wavemaker

Post 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
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem wavemaker

Post 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.
marco3020
Posts: 75
Joined: Sun Feb 19, 2012 12:18 pm

Re: Problem wavemaker

Post 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
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem wavemaker

Post by lnevo »

What is the error you are getting?
Post Reply