Hello,
First I want to thank you for sticking through this with me. Well I swapped around the lines and changed the highfloatflag. So the outlet is correct when it goes high it does shut off but the buzzer goes to 100% when the switch is low and goes to 0% on High. Not to sure what's the deal.
Thanks again!
Wes
ATO Timeout question
Re: ATO Timeout question
I told you what to do if that happens. Change == to !=
Can you please post the current code. And confirm that you tried both scenario?
Can you please post the current code. And confirm that you tried both scenario?
-
- Posts: 12
- Joined: Wed Dec 11, 2013 10:31 am
Re: ATO Timeout question
Sorry thought I did...
Here is the current code.
I tried the != 1 and that was 100% on high and 1% on low.
I thought I tried the == but I guess, I didn't write that one down on my pad. I'll let you know in a sec.
Thanks!
Here is the current code.
Code: Select all
#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 <ReefAngel.h>
// Initialize Buzzer variables
byte buzzer=0;
byte highfloatflag=0;
////// 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.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port2Bit | Port3Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 830 );
// Ports that are always on
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.CO2Control( Port1,638,678 );
highfloatflag = ReefAngel.HighATO.IsActive();
ReefAngel.Relay.Set(Port2, highfloatflag);
if (highfloatflag) buzzer = 100; else buzzer=0;
ReefAngel.PWM.SetDaylight( buzzer );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "westonhull" );
ReefAngel.ShowInterface();
}
I thought I tried the == but I guess, I didn't write that one down on my pad. I'll let you know in a sec.
Thanks!
Re: ATO Timeout question
There can be no 1% with the code we have:
if (highfloatflag) buzzer = 100; else buzzer=0;
Because no matter what it's getting set to 100 or 0.
From the conversations we had, the 1% was when we were doing < and > comparisons...
if (highfloatflag) buzzer = 100; else buzzer=0;
Because no matter what it's getting set to 100 or 0.
From the conversations we had, the 1% was when we were doing < and > comparisons...
Re: ATO Timeout question
Looking at your code if the outlet is working properly we will want to do this:
We took away the == and != comparison...so that wasn't relevant. Sorry my bad.
Code: Select all
highfloatflag = ReefAngel.HighATO.IsActive();
ReefAngel.Relay.Set(Port2, highfloatflag);
if (highfloatflag) buzzer=0; else buzzer=100;
ReefAngel.PWM.SetDaylight( buzzer );
-
- Posts: 12
- Joined: Wed Dec 11, 2013 10:31 am
Re: ATO Timeout question
Hello,
Well that worked! You are way better at this than I am. Where did you learn this language from? Do you have any books for dummy's for this stuff, if so I need them to get them? Anyways, Here is the final code. Thanks for helping me!
Well that worked! You are way better at this than I am. Where did you learn this language from? Do you have any books for dummy's for this stuff, if so I need them to get them? Anyways, Here is the final code. Thanks for helping me!
Code: Select all
#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 <ReefAngel.h>
// Initialize Buzzer variables
byte buzzer=0;
byte highfloatflag=0;
////// 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.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port2Bit | Port3Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 830 );
// Ports that are always on
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.CO2Control( Port1,638,678 );
highfloatflag = ReefAngel.HighATO.IsActive();
ReefAngel.Relay.Set(Port2, highfloatflag);
if (highfloatflag) buzzer = 0; else buzzer=100;
ReefAngel.PWM.SetDaylight( buzzer );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "westonhull" );
ReefAngel.ShowInterface();
}
Re: ATO Timeout question
The language is C. You can find many books and sites on the language. It's pretty straight forward. The challenge here I think was just the different approach that was taken with the comparison and a bit of brain fart on my end.