Dosing Calcium and Alkalinity

Post Reply
SEANTADEZ
Posts: 16
Joined: Tue Feb 25, 2014 8:38 pm
Contact:

Dosing Calcium and Alkalinity

Post by SEANTADEZ »

Hello guys i'm new here... another wamas member, i just have a silly question about my dosing pumps:

Before, i was using a timer schedule to add during the day the calcium and at nights the alkalinity solution, now i got my RA Controller and I'm not familiar with the code yet, my question is, the wizard allow me to set every 60 min dosing for X sec, is that fine if i dose alk and calcium every hour with 30 min delay in one? or should i try to build a code to go back to my old schedule of day and night dosing?

any comments? Help with code?

Thanks
Last edited by SEANTADEZ on Mon Mar 17, 2014 11:51 am, edited 1 time in total.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Dosing Calcium and Alkalinity

Post by lnevo »

The RA defaults will dose hourly with a 5 minute delay between each dosing pump. For ease of use I would say stick with that...

However, being that this is the ReefAngel and you shoudl be able to do whatever you want to do :)

What I would do is set the dosing pumps to dose the appropriate amount you want. Then use similar code below to override this to meet your needs...

Let's say Port 1 is your Calcium and Port 2 is your Alk. You have them set in the portal or in your code to dose for X seconds. You want Port 1 to only dose during the day and Port 2 to dose only at night.

So...

Code: Select all

if (hour() >= 8) && (hour() < 20) { // Between 8am and 8pm we will disable Port 2
  ReefAngel.Relay.Off(Port2);
} else { // At night we'll disable Port1
  ReefAngel.Relay.Off(Port1);
}
SEANTADEZ
Posts: 16
Joined: Tue Feb 25, 2014 8:38 pm
Contact:

Re: Dosing Calcium and Alkalinity

Post by SEANTADEZ »

great, so what i need to do is calculate the ml that can be dose in 12 hours to keep my level of dose and paste this code to split the dose (cal-Day, all-night) right?
SEANTADEZ
Posts: 16
Joined: Tue Feb 25, 2014 8:38 pm
Contact:

Re: Dosing Calcium and Alkalinity

Post by SEANTADEZ »

I got this error:

The following features were automatically added:
Watchdog Timer
Version Menu

The following features were detected:
2014 Main Screen
Extra Font - Medium Size (8x8 pixels)
Standard Menu
basico_inicial.cpp: In function 'void setup()':
basico_inicial:67: error: expected identifier before '(' token
basico_inicial:67: error: expected `;' before '(' token
basico_inicial:78: error: a function-definition is not allowed here before '{' token
basico_inicial:92: error: expected `}' at end of input



Is there anything i should add before paste the code? I'm missing something else?

BTW thanks a lot for your help
SEANTADEZ
Posts: 16
Joined: Tue Feb 25, 2014 8:38 pm
Contact:

Re: Dosing Calcium and Alkalinity

Post by SEANTADEZ »

this is the whole code:


#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.AddStandardMenu(); // Add Standard Menu

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


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

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


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

void loop()
{
ReefAngel.DosingPumpRepeat( Port1,00,60,10 );
ReefAngel.DosingPumpRepeat( Port2,0,60,10 );
ReefAngel.StandardHeater( Port7,780,795 );
ReefAngel.StandardLights( Port8,22,0,8,0 );

////// Place your custom code below here

if (hour() >= 8) && (hour() < 20) { // Between 8am and 8pm we will disable Port 2
ReefAngel.Relay.Off(Port2);
} else { // At night we'll disable Port1
ReefAngel.Relay.Off(Port1);
}

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

// This should always be the last line
ReefAngel.ShowInterface();
}
SEANTADEZ
Posts: 16
Joined: Tue Feb 25, 2014 8:38 pm
Contact:

Re: Dosing Calcium and Alkalinity

Post by SEANTADEZ »

I was trying to add the code that you post for someone else about clear the overheat function and i got error too...
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Dosing Calcium and Alkalinity

Post by lnevo »

Sorry, I made some mistakes in the parenthesis

Code: Select all

if ((hour() >= 8) && (hour() < 20)) { // Between 8am and 8pm we will disable Port 2
  ReefAngel.Relay.Off(Port2);
} else { // At night we'll disable Port1
  ReefAngel.Relay.Off(Port1);
}
SEANTADEZ
Posts: 16
Joined: Tue Feb 25, 2014 8:38 pm
Contact:

Re: Dosing Calcium and Alkalinity

Post by SEANTADEZ »

lnevo wrote:Sorry, I made some mistakes in the parenthesis

Code: Select all

if ((hour() >= 8) && (hour() < 20)) { // Between 8am and 8pm we will disable Port 2
  ReefAngel.Relay.Off(Port2);
} else { // At night we'll disable Port1
  ReefAngel.Relay.Off(Port1);
}
Awesome that works great...

I really appreciate it...
Post Reply