This code only enables the ATO to work once every 2 hours. even if it works for only half a second, it would only allow to pump again after 2 hours.
To disable the 2 hour restriction, replace the 2 for 0.
To test the ports, you can use the ControllerTester code.
File->Sketchbook->Example Codes
I thought the last digit is for time-out in minutes.
How can I setup the ATO pump timeout, if the ato pump is on for more than X minutes to turn on the red light and to shutdown the ato pump?
Also, since the latest library update, without modifying the code, I can't upload it to RA anymore, size too big.
here is the old code, including the wifi module. Is it possible to make it smaller, without losing the main functions? I'm not using the pH sensor anymore, so pH related code can go.
If the start time is greater than the end time, it will automatically work now.
If the start time is less than the end time it reverse to the old default behavior. Nothing for you to change except have the start and end time be what you want
I upgraded the RA 6.1 board to Plus 2.1 and I was able to upload the custom program but the LCD is blank (sometimes I see a white horizontal line but it works fine with the old board) and during upload of the memory program the compiler displays the following error:
"The following features were automatically added:
Watchdog Timer
Version Menu
===
The following features were detected:
Simple Menu
C:\Users\Alex\Documents\Arduino\libraries\RA_NokiaLCD\RA_NokiaLCD.cpp: In member function 'void RA_NokiaLCD::SendCMD(byte)':
C:\Users\Alex\Documents\Arduino\libraries\RA_NokiaLCD\RA_NokiaLCD.cpp:709: error: 'ReefAngel' was not declared in this scope"
===
It's using the latest RA libraries 1.1.0
Here is the internal memory:
For the past weeks i switched from dosing Ca & Alk to dosing Kalk + vinegar solution. Now that the Ph probe is working properly with the new RA plus board i'd like the ato sensor(s) to control the kalk + vinegar dosing pump instead of water if the ph is lower than lets say 8.1
This the current config:
ReefAngel.SingleATO(true,Box1_Port2,180,2);
ReefAngel.DosingPumpRepeat(Port8,1,120,4);
If the ph is smaller than 8.1 then ReefAngel.SingleATO(true,Port8,180,1) else ReefAngel.SingleATO(true,Box1_Port2,180,2);
If pH <=818 & ATO ON then the ATO controls the Kalk pump but if during this process ph>818 and the ATO still on, it stops pumping kalk and it doesn' start pumping fresh water without manually resetting the ATO sensor On/OFF
This is the existing code:
if (ReefAngel.Params.PH <= 818)
{
ReefAngel.SingleATO(true,Box1_Port7,70,0);
ReefAngel.Relay.Off(Box1_Port8);
}
else
{
ReefAngel.SingleATO(true,Box1_Port8,120,0);
ReefAngel.Relay.Off(Box1_Port7);
}
I think we have to introduce another IF that checks the ATO status.
We have the following variables:
Ph <= 818
Single ATO status = On/Off
ATO pump port = Box1_Port8
Kalk pump port = Box1_Port7
If ph <= 818
then
check ATO Status
{If ATO ON then
ReefAngel.SingleATO(true,Box1_Port7,70,1); # ATO pumps kalk
ReefAngel.Relay.Off(Box1_Port8);
else
ReefAngel.Relay.On(Box1_Port7); #Kalk pump ON
ReefAngel.Relay.Off(Box1_Port8);
}
else
{
ReefAngel.SingleATO(true,Box1_Port8,120,1); # ATO pumps fresh water
ReefAngel.Relay.Off(Box1_Port7);
It needs a check ATO Status refresh at this point.
}
I think it is your restriction on the single ato function.
ReefAngel.SingleATO(true,Box1_Port8,120,1);
The last 1 means it will have to wait another hour to pump again.
Try zero instead.
Anyway, lets disregard this idea for now. It doesn't make too much sense in practice.
What's the safest way to dose kalk via Box1_Port7 if the ph drops below 818 but I also need a time out and a waiting period similar to the ATO function?
I built this code for now, is it ok? It will dose kalk for 20 seconds every 10 min until pH goes above 818, I hope. For my 8-9 gal of water, a 20 sec dose of kalk + vinegar+water (2g+15ml+1l) will increase the pH by 0.01-0.02
if (ReefAngel.Params.PH <= 818){ReefAngel.DosingPumpRepeat(Box1_Port7,0,10,20);}
if (ReefAngel.Params.PH >= 820){ReefAngel.Relay.Off(Box1_Port7);}
if (ReefAngel.Params.PH < 800){ReefAngel.Relay.Off(Box1_Port7);} #if it runs out of kalk or if the pH probe is damaged
Look what happend when it ran out of kalk + vinegar.
I left home for a couple of days and i forgot to refill the kalk+v container. When I realized why the pH was dropping I turned on an air pump to push more air into the skimmer. It helped for a while...but it was not enough.