Page 1 of 1
Re: Continuos Water Change
Posted: Mon Jan 19, 2015 12:10 pm
by lnevo
Put this in the custom code section. Btw, you had Box1_Port1 on/off with your lights... you can change it back if that's your preference.
If you need to switch around the ports below, go ahead. But this is pretty much the easiest. You'll add a few ml of water, and then take a few ml of water out. It really won't be a big difference considering your frequency and this way it won't mess with the ATO and you won't have to disable during the operation.
Code: Select all
ReefAngel.Relay.On( Box1_Port1 ); // ATO port is always on
ReefAngel.DosingPumpRepeat1(Box1_Port6); // AWC change 2 (add)
ReefAngel.DosingPumpRepeat2(Box1_Port5); // AWC change 1 (drain)
Re: Continuos Water Change
Posted: Mon Jan 19, 2015 7:22 pm
by Rodasphoto
lnevo wrote:Put this in the custom code section. Btw, you had Box1_Port1 on/off with your lights... you can change it back if that's your preference.
If you need to switch around the ports below, go ahead. But this is pretty much the easiest. You'll add a few ml of water, and then take a few ml of water out. It really won't be a big difference considering your frequency and this way it won't mess with the ATO and you won't have to disable during the operation.
Code: Select all
ReefAngel.Relay.On( Box1_Port1 ); // ATO port is always on
ReefAngel.DosingPumpRepeat1(Box1_Port6); // AWC change 2 (add)
ReefAngel.DosingPumpRepeat2(Box1_Port5); // AWC change 1 (drain)
Sorry for this dumb question but how would I change the values of how long they run? I have always hard coded by settings. I have my ATO on a timer because it is so loud that it has woken me up at night so I set to turn on with the lights since I am usually up by then. Should I take the first line off so that way it follows the time schedule?
Re: Continuos Water Change
Posted: Mon Jan 19, 2015 7:24 pm
by lnevo
Yeah you can go back to the daylights code you had for it before if that works for you. As far as the changes I'm assuming you have wifi? You can set the values through the portal or universal app
Re: Continuos Water Change
Posted: Tue Jan 20, 2015 5:34 pm
by Rodasphoto
lnevo wrote:Yeah you can go back to the daylights code you had for it before if that works for you. As far as the changes I'm assuming you have wifi? You can set the values through the portal or universal app
I am sorry to bother you again. I was looking through the reef angel app and did not see dosingpump repeat1 or dosingpumprepeat2. I am not sure not sure which memory location I should input a value. Also is the value in seconds? can I do tenths of seconds?
Code: Select all
[quote]
#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <[color=#CC6600]Wire[/color].h>
#include <[color=#CC6600]OneWire[/color].h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <[color=#006699]LED[/color].h>
#include <RA_TempSensor.h>
#include <[color=#006699]Relay[/color].h>
#include <RA_PWM.h>
#include <[color=#006699]Timer[/color].h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <[color=#006699]Salinity[/color].h>
#include <[color=#006699]RF[/color].h>
#include <[color=#006699]IO[/color].h>
#include <[color=#006699]ORP[/color].h>
#include <[color=#006699]AI[/color].h>
#include <[color=#006699]PH[/color].h>
#include <[color=#006699]WaterLevel[/color].h>
#include <[color=#006699]Humidity[/color].h>
#include <[color=#006699]DCPump[/color].h>
#include <[color=#006699]PAR[/color].h>
#include <[color=#CC6600]ReefAngel[/color].h>
[color=#7E7E7E]////// Place global variable code below here[/color]
[color=#7E7E7E]////// Place global variable code above here[/color]
[color=#CC6600]void[/color] [color=#CC6600][b]setup[/b][/color]()
{
[color=#7E7E7E]// This must be the first line[/color]
[color=#CC6600]ReefAngel[/color].[color=#CC6600]Init[/color](); [color=#7E7E7E]//Initialize controller[/color]
[color=#CC6600]ReefAngel[/color].[color=#CC6600]Use2014Screen[/color](); [color=#7E7E7E]// Let's use 2014 Screen [/color]
[color=#7E7E7E]// Ports toggled in Feeding Mode[/color]
[color=#CC6600]ReefAngel[/color].[color=#006699]FeedingModePorts[/color] = [color=#006699]Port1Bit[/color] | [color=#006699]Port5Bit[/color] | [color=#006699]Port8Bit[/color];
[color=#CC6600]ReefAngel[/color].[color=#006699]FeedingModePortsE[/color][0] = [color=#006699]Port1Bit[/color];
[color=#7E7E7E]// Ports toggled in Water Change Mode[/color]
[color=#CC6600]ReefAngel[/color].[color=#006699]WaterChangePorts[/color] = [color=#006699]Port1Bit[/color] | [color=#006699]Port3Bit[/color] | [color=#006699]Port4Bit[/color] | [color=#006699]Port5Bit[/color] | [color=#006699]Port8Bit[/color];
[color=#CC6600]ReefAngel[/color].[color=#006699]WaterChangePortsE[/color][0] = [color=#006699]Port1Bit[/color] | [color=#006699]Port4Bit[/color] | [color=#006699]Port7Bit[/color];
[color=#7E7E7E]// Ports toggled when Lights On / Off menu entry selected[/color]
[color=#CC6600]ReefAngel[/color].[color=#006699]LightsOnPorts[/color] = 0;
[color=#CC6600]ReefAngel[/color].[color=#006699]LightsOnPortsE[/color][0] = 0;
[color=#7E7E7E]// Ports turned off when Overheat temperature exceeded[/color]
[color=#CC6600]ReefAngel[/color].[color=#006699]OverheatShutoffPorts[/color] = [color=#006699]Port2Bit[/color] | [color=#006699]Port3Bit[/color] | [color=#006699]Port4Bit[/color] | [color=#006699]Port8Bit[/color];
[color=#CC6600]ReefAngel[/color].[color=#006699]OverheatShutoffPortsE[/color][0] = [color=#006699]Port7Bit[/color];
[color=#7E7E7E]// Use T1 probe as temperature and overheat functions[/color]
[color=#CC6600]ReefAngel[/color].[color=#006699]TempProbe[/color] = [color=#006699]T1_PROBE[/color];
[color=#CC6600]ReefAngel[/color].[color=#006699]OverheatProbe[/color] = [color=#006699]T1_PROBE[/color];
[color=#7E7E7E]// Ports that are always on[/color]
[color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]On[/color]( [color=#006699]Port1[/color] );
[color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]On[/color]( [color=#006699]Port8[/color] );
[color=#7E7E7E]////// Place additional initialization code below here[/color]
[color=#7E7E7E]////// Place additional initialization code above here[/color]
}
[color=#CC6600]void[/color] [color=#CC6600][b]loop[/b][/color]()
{
[color=#CC6600]ReefAngel[/color].[color=#CC6600]DayLights[/color]( [color=#006699]Port2[/color] );
[color=#CC6600]ReefAngel[/color].[color=#CC6600]DayLights[/color]( [color=#006699]Port3[/color] );
[color=#CC6600]ReefAngel[/color].[color=#CC6600]DayLights[/color]( [color=#006699]Port4[/color] );
[color=#CC6600]ReefAngel[/color].[color=#CC6600]DayLights[/color]( [color=#006699]Port5[/color] );
[color=#CC6600]ReefAngel[/color].[color=#CC6600]DosingPumpRepeat1[/color]( [color=#006699]Port6[/color] );
[color=#CC6600]ReefAngel[/color].[color=#CC6600]StandardHeater[/color]( [color=#006699]Port7[/color] );
[color=#CC6600]ReefAngel[/color].[color=#CC6600]DayLights[/color]( [color=#006699]Box1_Port1[/color] );
[color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]Channel0PWMParabola[/color]();
[color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]Channel1PWMParabola[/color]();
[color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]Channel2PWMParabola[/color]();
[color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]Channel3PWMParabola[/color]();
[color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]Channel4PWMParabola[/color]();
[color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]Channel5PWMParabola[/color]();
[color=#7E7E7E]////// Place your custom code below here[/color]
[color=#CC6600]ReefAngel[/color].[color=#CC6600]DosingPumpRepeat1[/color]([color=#006699]Box1_Port6[/color]); [color=#7E7E7E]// AWC change 2 (add)[/color]
[color=#CC6600]ReefAngel[/color].[color=#CC6600]DosingPumpRepeat2[/color]([color=#006699]Box1_Port5[/color]); [color=#7E7E7E]// AWC change 1 (drain)[/color]
[color=#7E7E7E]////// Place your custom code above here[/color]
[color=#7E7E7E]// This should always be the last line[/color]
[color=#CC6600]ReefAngel[/color].[color=#CC6600]Portal[/color]( [color=#006699]"Rodasphoto"[/color] );
[color=#CC6600]ReefAngel[/color].[color=#CC6600]ShowInterface[/color]();
}
[/quote]
Re: Continuos Water Change
Posted: Tue Jan 20, 2015 6:31 pm
by rimai
Use the dosing pump repeat timer and interval memory locations
Re: Continuos Water Change
Posted: Thu Jan 22, 2015 3:17 pm
by Rodasphoto
rimai wrote:Use the dosing pump repeat timer and interval memory locations
Found that the Dosing Pump Timer is the length of time the dosing pump is on but is this in seconds or is it like our lighting that has a max of 225ish.
Also found that the DosingPump Repeat Interval sets the time between each time the pumps will run. Is this in seconds, minutes, or what? I would like to run my dosing pumps every 9 minutes, so would I just write a 9 for that location?
Re: Continuos Water Change
Posted: Thu Jan 22, 2015 4:22 pm
by lnevo
Yeah repeat is in minutes and the time is in seconds. I believe its an int so you should be able to do more than 255 seconds. Roberto can you confirm?
Re: Continuos Water Change
Posted: Thu Jan 22, 2015 4:29 pm
by rimai
Code: Select all
void DosingPumpRepeat(byte DPRelay, int OffsetMinute, int RepeatMinute, int RunTime);
Yes, they are all int, so you can go up to 32000
Re: Continuos Water Change
Posted: Fri Jan 23, 2015 4:33 pm
by Rodasphoto
Many thanks.