Do you have a question on how to do something.
Ask in here.
ewaldsreef
Posts: 82 Joined: Tue Oct 08, 2013 8:22 pm
Location: Salt Lake City, UT
Contact:
Post
by ewaldsreef » Sun Feb 15, 2015 2:01 pm
Thank you so much for your time. I screwed something up lol
I was unsucessful with the code so I tryed to return to my previous code but now the lights dont workwith the timmer. Here is my current code as I have it.
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 <PAR.h>
#include <ReefAngel.h>
// Initialize Buzzer variables
byte buzzer=0;
byte overheatflag=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
ReefAngel.AddSalinityExpansion(); // Salinity Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port4Bit | Port5Bit | Port6Bit | Port7Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port2Bit | Port3Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.DayLights( Port2 );
ReefAngel.ActinicLights( Port3 );
ReefAngel.Relay.DelayedOn( Port4 );
ReefAngel.StandardHeater( Port6 );
overheatflag = InternalMemory.read( Overheat_Exceed_Flag );
buzzer = overheatflag;
if ( buzzer >= 1 ) buzzer = 100;
ReefAngel.PWM.SetActinic( buzzer );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "ewaldsreef" );
ReefAngel.ShowInterface();
}
ewaldsreef
Posts: 82 Joined: Tue Oct 08, 2013 8:22 pm
Location: Salt Lake City, UT
Contact:
Post
by ewaldsreef » Sun Feb 15, 2015 2:19 pm
I had AI Vegas on the tank so I did not use the light ports previously. The AIs are not working right now so I went back to my old setup. I have the lights setup to run daylight at 12pm to 9pm with actinics to turn on 30 minute before and after.
Seriusly considering purchasing another setup to learn on and then add to my propigation system in the future. Also purchased and Uno to learn some basics.
Again I thank you for your help
ewaldsreef
Posts: 82 Joined: Tue Oct 08, 2013 8:22 pm
Location: Salt Lake City, UT
Contact:
Post
by ewaldsreef » Sun Feb 15, 2015 6:56 pm
Got everthing working perfect except the buzzer will not go on when low float is trigger in the sump. It does trigger port 8 Properly
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 <PAR.h>
#include <ReefAngel.h>
// Initialize Buzzer variables
byte buzzer=0;
byte overheatflag=0;
boolean alert=false;
////// 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
ReefAngel.AddSalinityExpansion(); // Salinity Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port4Bit | Port5Bit | Port6Bit | Port7Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port2Bit | Port3Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights(Port2,11,30,21,30);
ReefAngel.StandardLights(Port3,12,0,21,0);
ReefAngel.Relay.DelayedOn( Port4 );
ReefAngel.StandardHeater( Port6 );
overheatflag = InternalMemory.read( Overheat_Exceed_Flag );
buzzer = overheatflag;
if ( buzzer >= 1 ) buzzer = 100;
ReefAngel.PWM.SetActinic( buzzer );
////// Place your custom code below here
{
// Low Float for RO water
if (ReefAngel.LowATO.IsActive())
{
ReefAngel.Relay.On(Port8);
alert=false;
}
else
{
ReefAngel.Relay.Off(Port8);
alert=true;
}
// High Float for Overflow
if (ReefAngel.HighATO.IsActive())
{
ReefAngel.Relay.On(Port1);
alert=false;
}
else
{
ReefAngel.Relay.Off(Port1);
alert=true;
}
if (alert)
{
ReefAngel.PWM.SetActinic(100);
}
else
{
ReefAngel.PWM.SetActinic(0);
}
ReefAngel.ShowInterface();
}
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "ewaldsreef" );
ReefAngel.ShowInterface();
}
rimai
Posts: 12881 Joined: Fri Mar 18, 2011 6:47 pm
Post
by rimai » Sun Feb 15, 2015 7:45 pm
Oh yeah....
One condition was overriding the other. Sorry.
Try this:
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 <PAR.h>
#include <ReefAngel.h>
// Initialize Buzzer variables
byte buzzer=0;
byte overheatflag=0;
boolean alert=false;
////// 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
ReefAngel.AddSalinityExpansion(); // Salinity Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port4Bit | Port5Bit | Port6Bit | Port7Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port2Bit | Port3Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
alert=false;
ReefAngel.StandardLights(Port2,11,30,21,30);
ReefAngel.StandardLights(Port3,12,0,21,0);
ReefAngel.Relay.DelayedOn( Port4 );
ReefAngel.StandardHeater( Port6 );
overheatflag = InternalMemory.read( Overheat_Exceed_Flag );
buzzer = overheatflag;
if ( buzzer >= 1 ) alert=true;
////// Place your custom code below here
// Low Float for RO water
if (ReefAngel.LowATO.IsActive())
{
ReefAngel.Relay.On(Port8);
}
else
{
ReefAngel.Relay.Off(Port8);
alert=true;
}
// High Float for Overflow
if (ReefAngel.HighATO.IsActive())
{
ReefAngel.Relay.On(Port1);
}
else
{
ReefAngel.Relay.Off(Port1);
alert=true;
}
if (alert)
{
ReefAngel.PWM.SetActinic(100);
}
else
{
ReefAngel.PWM.SetActinic(0);
}
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "ewaldsreef" );
ReefAngel.ShowInterface();
}
Roberto.
ewaldsreef
Posts: 82 Joined: Tue Oct 08, 2013 8:22 pm
Location: Salt Lake City, UT
Contact:
Post
by ewaldsreef » Sun Feb 15, 2015 8:37 pm
Perfect! Thank you