New RAGen code has singleATO reversed??
Posted: Mon Apr 16, 2012 11:08 am
I've been having issues with my controller locking up from the wavemakers on the wrong ports so I recently remade my internal memory and main code with the latest version of RAGen. Now my singleATO float is working backwards.
The old ATO setup that’s been working flawlessly for me for nearly 10 months consists of two floats, with the top float serving solely as a failsafe to kill power to the ATO pump if the bottom float gets stuck down. Both floats are positioned with the wires coming out of the top. The bottom switch turns the ATO pump on when the water lets the float drop down and then turns the pump back off once the float rises back up enough.
Now with the freshly generated code, the ATO pump is only turned on when the bottom ATO switch’s float is UP (closest to the wires) and NOT down (float furthest from the wires and closest to the water). The high ATO switch retains its intended functionality. It would appear something is backwards in the latest libraries?
The old ATO setup that’s been working flawlessly for me for nearly 10 months consists of two floats, with the top float serving solely as a failsafe to kill power to the ATO pump if the bottom float gets stuck down. Both floats are positioned with the wires coming out of the top. The bottom switch turns the ATO pump on when the water lets the float drop down and then turns the pump back off once the float rises back up enough.
Now with the freshly generated code, the ATO pump is only turned on when the bottom ATO switch’s float is UP (closest to the wires) and NOT down (float furthest from the wires and closest to the water). The high ATO switch retains its intended functionality. It would appear something is backwards in the latest libraries?
Code: Select all
// Autogenerated file by RAGen (v1.2.2.171), (04/10/2012 22:45)
// RA_041012_2245.ino
//
// This version designed for v0.9.0 or later
/* The following features are enabled for this File:
#define DisplayImages
#define VersionMenu
#define wifi
#define SIMPLE_MENU
#define ENABLE_EXCEED_FLAGS
*/
#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>
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
//Overrides the values that are configured within Controller menu
ReefAngel.PHMin=417; //7.0 PH Calibration Fluid, was 300 now 417
ReefAngel.PHMax=744; //10.0 PH Calibration Fluid, was 615 now 744
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port5Bit | Port6Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port3Bit;
// Ports that are always on
ReefAngel.Relay.On(Port8);
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
// Specific functions that use Internal Memory values
ReefAngel.SingleATOLow(Port1);
ReefAngel.Relay.DelayedOn(Port2, 5);
ReefAngel.StandardLights(Port3);
ReefAngel.StandardFan(Port4);
ReefAngel.Wavemaker1(Port5);
ReefAngel.Wavemaker2(Port6);
ReefAngel.StandardHeater(Port7);
////// Place your custom code below here
if (ReefAngel.HighATO.IsActive()) ReefAngel.Relay.Off(Port1); //Turns off ATO if high float is activated
////// Place your custom code above here
// This sends all the data to the portal
// Do not add any custom code that changes any relay status after this line
// The only code after this line should be the ShowInterface function
ReefAngel.Portal("yuppiwanna", "*************");
// This should always be the last line
ReefAngel.ShowInterface();
}