ATO Hi or Lo turn off main pump

Do you have a question on how to do something.
Ask in here.
User avatar
Posts: 20
Joined: Thu Sep 17, 2015 12:02 pm
Location: Denver
PostPosted: Wed Oct 14, 2015 3:00 pm
Can we program the float switches for ATO Hi or Lo to turn off main pump? I currently have a pvc pipe with the two float switches attached. One facing up in the water floating and another mounted higher up for a high water mark. On the Reef angel client the ATO Hi & Lo show green... which is what I consider to be in safe zone. They turn red when out of that safe zone and I would like to have my pump turn off on a trigger of those.




#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 <PAR.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 = Port5Bit | Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port7Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 835 );


// Ports that are always on
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port8 );

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


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

void loop()
{
ReefAngel.StandardHeater( Port1,786,790 );
ReefAngel.Wavemaker( Port5,20 );
ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
ReefAngel.StandardLights( Port7,16,0,12,0 );
////// Place your custom code below here
if (now()%180<22)
{
ReefAngel.Relay.On(Port5);
ReefAngel.Relay.On(Port6);
}


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

// This should always be the last line
ReefAngel.ShowInterface();
}
Blend-FM.com Faded Friday's every Friday night at: https://www.stream.me/BlendFM

Image

Posts: 12507
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Wed Oct 14, 2015 3:54 pm
Try this:
Code: Select all
ReefAngel.Relay.Set(Port8, ReefAngel.LowATO.IsActive() && ReefAngel.HighATO.IsActive());
Roberto.
User avatar
Posts: 20
Joined: Thu Sep 17, 2015 12:02 pm
Location: Denver
PostPosted: Wed Oct 14, 2015 7:13 pm
yep that works. I changed the port from 8 to 3 where my main pump is plugged in. Thank you!
Blend-FM.com Faded Friday's every Friday night at: https://www.stream.me/BlendFM

Image

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 4 guests

cron