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.
#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 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.
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!
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.