Page 1 of 1
RA Wizard equivalent of Code
Posted: Sun Oct 20, 2013 12:05 pm
by OceanWolf
This may be a dumb question, but I got lost in the threads and couldn't find my answer.
I have a wifi expansion in addition to RA+. I generated the code that I am currently using with RA Wizard. I want to make changes to the parameters such as on off times for moonlight, but the code does not have them in there. Are there any basic code set that I can start playing with. Everyone has fancy ATO switches etc, which does not apply to me.
I have 2 temp sensors, 1 PH sensor, 1 Moonlight, 1 DawnDusk, 1 Daylight, 1 Skimmer, 2 pumps (Nanocube Stock pumps) alternating, 1 Heater and 1 Vortech.
I am not allowed to use my web banner url yet, here is the screen shot of what I have.
Can I get a basic code that I can tinker with?
Screen Shot 2013-10-20 at 11.57.25 AM.png
Re: RA Wizard equivalent of Code
Posted: Sun Oct 20, 2013 1:25 pm
by rimai
Can you post your code?
Sent from my SPH-L710 using Tapatalk
Re: RA Wizard equivalent of Code
Posted: Sun Oct 20, 2013 4:47 pm
by OceanWolf
rimai wrote:Can you post your code?
Sent from my SPH-L710 using Tapatalk
It is down below. I am also sorry that I should have posted that in the PDE/INO Files section. Roberto, can you move it?
Thanks
Onur
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>
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
InternalMemory.LCDID_write(0);
ReefAngel.Init(); //Initialize controller
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port4Bit | Port5Bit | Port6Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port4Bit | Port5Bit | Port6Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port3Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
ReefAngel.AddStandardMenu();
// Ports that are always on
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.MoonLights( Port1 );
ReefAngel.ActinicLights( Port2 );
ReefAngel.DayLights( Port3 );
ReefAngel.MoonLights( Port4 );
ReefAngel.Wavemaker1( Port5 );
ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
ReefAngel.StandardHeater( Port7 );
ReefAngel.ActinicLights( Port8 );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Oceanwolf" );
ReefAngel.ShowInterface();
}
Re: RA Wizard equivalent of Code
Posted: Sun Oct 20, 2013 5:02 pm
by rimai
When you generate the code, use the hard coded settings.
Re: RA Wizard equivalent of Code
Posted: Sun Oct 20, 2013 10:35 pm
by OceanWolf
rimai wrote:When you generate the code, use the hard coded settings.
Thanks Roberto. I switched to hard coded settings, now I can see the times. I also added feeding times.
Do you know why the RAGen does not pick up the Gen 3 LCD? I use the code line you suggested in an earlier thread.
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>
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
InternalMemory.LCDID_write(0);
ReefAngel.Init(); //Initialize controller
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port4Bit | Port5Bit | Port6Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port4Bit | Port5Bit | Port6Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port3Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 820 );
ReefAngel.AddStandardMenu();
// Ports that are always on
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port1,23,0,1,0 );
ReefAngel.StandardLights( Port2,11,30,23,0 );
ReefAngel.StandardLights( Port3,12,0,22,0 );
ReefAngel.StandardLights( Port4,8,0,23,0 );
ReefAngel.WavemakerRandom( Port5,90,120 );
ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
ReefAngel.StandardHeater( Port7,710,790 );
ReefAngel.StandardLights( Port8,8,0,23,0 );
////// Place your custom code below here
// Feeding mode at 8 Am and 6 PM//
if ( (now()%86400==28800) || (now()%86400==64800) ) {
ReefAngel.FeedingModeStart();
}
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Oceanwolf" );
ReefAngel.ShowInterface();
}
Re: RA Wizard equivalent of Code
Posted: Mon Oct 21, 2013 8:41 am
by rimai
This line is only really need once in the lifetime of the controller.
If you upload the code once with this line, you really don't need it ever again

Re: RA Wizard equivalent of Code
Posted: Mon Oct 21, 2013 7:48 pm
by OceanWolf
rimai wrote:
This line is only really need once in the lifetime of the controller.
If you upload the code once with this line, you really don't need it ever again

Thanks. I always worried that I will forget to add it.
Now I don't have to worry.
Onur