Regular ATO function

Do you have a question on how to do something.
Ask in here.
Post Reply
lucho
Posts: 80
Joined: Fri Mar 02, 2012 8:11 am

Regular ATO function

Post by lucho »

Hi. I want to use the ATO as a regular. This means that I want the ATO pump to activate when the low switch is down and shut down when the low switch is up. I would like to allow the second switch (upper switch) to act as a back-up (always on until the excess water moves it up and shuts it down).
Can someone help me with this code?

thanks!
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Regular ATO function

Post by rimai »

Try this:

Code: Select all

if (ReefAngel.HighATO.IsActive()) ReefAngel.SingleATOLow(Port1); else ReefAngel.Relay.Off(Port1);
Roberto.
User avatar
J_C
Posts: 49
Joined: Thu Feb 16, 2012 12:07 am

Re: Regular ATO function

Post by J_C »

The key is connecting the high and low switches to the correct port on the RA, this info can be found in the manual
Image
lucho
Posts: 80
Joined: Fri Mar 02, 2012 8:11 am

Re: Regular ATO function

Post by lucho »

Thanks. I tried to do this but now I get "sketch too big" when it is very short. I copied the whole sketch below, maybe someone can help me:

Code: Select all

/* The following features are enabled for this File: 
#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define wifi
#define SIMPLE_MENU
#define ENABLE_ATO_LOGGING
*/


#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 <ReefAngel.h>

prog_char id_label[] PROGMEM = "Lito";
prog_char probe1_label[] PROGMEM = "Sump";
prog_char probe2_label[] PROGMEM = "Refugium";
prog_char probe3_label[] PROGMEM = "Room";
prog_char relay1_label[] PROGMEM = "Actinic";
prog_char relay2_label[] PROGMEM = "Main%20Lights";
prog_char relay3_label[] PROGMEM = "Light%20Fans";
prog_char relay4_label[] PROGMEM = "Sump%20Lights";
prog_char relay5_label[] PROGMEM = "ATO";
prog_char relay6_label[] PROGMEM = "Heater";
prog_char relay7_label[] PROGMEM = "Skimmer";
prog_char relay8_label[] PROGMEM = "Return%20Pump";
PROGMEM const char *webbanner_items[] = {
    id_label, probe1_label, probe2_label, probe3_label, relay1_label, relay2_label,
   relay3_label, relay4_label, relay5_label, relay6_label, relay7_label, relay8_label};


void setup()
{
    ReefAngel.Init();  //Initialize controller

    // Ports that are always on
    ReefAngel.Relay.On(Port8); // Return pump
    ReefAngel.Relay.On(Port7); //Skimmer
    CheckWifi();
}

void loop()
{
    // Specific functions that use Internal Memory values
    ReefAngel.StandardLights(Port1,10,0,22,30); //Actinic lights
    ReefAngel.StandardLights(Port2,11,30,20,30); //Main lights
    ReefAngel.StandardLights(Port3,10,30,21,0); //Lights fan
    ReefAngel.StandardLights(Port4,18,0,11,0); //Sump Lights
    ReefAngel.StandardHeater(Port6,788,79.2);


    if (ReefAngel.HighATO.IsActive())
    { 
    ReefAngel.SingleATOLow(Port1);
    }
    else
    {
    ReefAngel.Relay.Off(Port1);
    }
    
    ReefAngel.Portal("lucho");    
    
    ReefAngel.ShowInterface();
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Regular ATO function

Post by rimai »

Make sure to enable simple menu on RAGen.
Roberto.
Post Reply