Page 1 of 1

ato code question

Posted: Sat Oct 13, 2012 3:50 pm
by emict326
i am wanting my float valves one in the sump to turn on the ato and one in the reservoir to stop the ato process if the water level is low, hear is some code that i made to acomplish this the ato pump will be port 6. i was not sure if this was where to place that code in the script and if the code will work?

void loop()
{
ReefAngel.DayLights( Port2 );
ReefAngel.ActinicLights( Port3 );
ReefAngel.StandardHeater( Port4 );
ReefAngel.StandardFan( Port5);
ReefAngel.SingleATOHigh( Port6 );
////// Place your custom code below here
ReefAngel.SingleATOHigh(Port6);
if (ReefAngel.LowATO.IsActive()) ReefAngel.Relay.Off(Port6);

Re: ato code question

Posted: Sat Oct 13, 2012 4:36 pm
by rimai
Yes, should work, but you got 2 lines that are the same.
Remove one of the duplicate ReefAngel.SingleATOHigh( Port6 );

Re: ato code question

Posted: Sat Oct 13, 2012 4:58 pm
by emict326
thanks

Re: ato code question

Posted: Sun Oct 14, 2012 6:35 am
by emict326
since this is my first attempt at modifying code my self and it is not uncommon for me to be gone from the house for 36 to 48 hr at a time. the other day my sump ran dry when i was gone for 3 days i would like to add the line of code to have my return pump stop if the ATO is triggered and the reservoir if low. I made this code but not sure if it is correct

ReefAngel.DayLights( Port2 );
ReefAngel.ActinicLights( Port3 );
ReefAngel.StandardHeater( Port4 );
ReefAngel.StandardFan( Port5);
ReefAngel.SingleATOHigh( Port6 );
////// Place your custom code below here;
if (ReefAngel.LowATO.IsActive()) ReefAngel.Relay.Off(Port6);
if (ReefAngel.HighATO.IsActive()) if (ReefAngel.LowATO.IsActive()) ReefAngel.Relay.Off(Port1);
////// Place your custom code above here

Re: ato code question

Posted: Sun Oct 14, 2012 8:04 am
by rimai
It should work.
Did you test?

Re: ato code question

Posted: Sun Oct 14, 2012 11:34 am
by emict326
not yet i am at work until Wednesday