How to get Lights on/off on RA controller?
- Express Reef
- Posts: 51
- Joined: Thu Mar 21, 2013 2:19 am
- Location: South Africa
How to get Lights on/off on RA controller?
Good Day All,
I`m new and I know zero about coding? Any advice how i can teach myself to code? I want to have the function Lights on/off on my RA controller. via the Head unit... how do I do it??? Still dont get my wifi to work but i need a rooter to get it to work...
I`m new and I know zero about coding? Any advice how i can teach myself to code? I want to have the function Lights on/off on my RA controller. via the Head unit... how do I do it??? Still dont get my wifi to work but i need a rooter to get it to work...
Re: How to get Lights on/off on RA controller?
The easiest way is to add the standard menu in the setup() section of your code.
Code: Select all
ReefAngel.AddStandardMenu();
Roberto.
- Express Reef
- Posts: 51
- Joined: Thu Mar 21, 2013 2:19 am
- Location: South Africa
Re: How to get Lights on/off on RA controller?
I dont know how to do it... is there not an easier way??? This whole code thing is too difficult for me... no program or app that can do the coding???
Re: How to get Lights on/off on RA controller?
Use the wizard:
http://forum.reefangel.com/viewtopic.php?f=8&t=1297
The preloaded code does that too.
Have you played around with the preloaded code yet?
http://forum.reefangel.com/viewtopic.php?f=8&t=1297
The preloaded code does that too.
Have you played around with the preloaded code yet?
Roberto.
- Express Reef
- Posts: 51
- Joined: Thu Mar 21, 2013 2:19 am
- Location: South Africa
Re: How to get Lights on/off on RA controller?
Hi Roberto,
I get an error... sketch to big!
#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 <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
ReefAngel.AddStandardMenu();
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 300 );
// Ports that are always on
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port1,9,15,18,15 );
ReefAngel.StandardLights( Port2,9,45,18,15 );
ReefAngel.StandardLights( Port3,10,15,17,30 );
ReefAngel.StandardLights( Port4,10,45,18,0 );
ReefAngel.StandardFan( Port5,252,260 );
ReefAngel.StandardHeater( Port6,250,255 );
ReefAngel.PWM.SetDaylight( MoonPhase() );
ReefAngel.PWM.SetActinic( MoonPhase() );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Express Reef" );
ReefAngel.ShowInterface();
}
I get an error... sketch to big!
#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 <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
ReefAngel.AddStandardMenu();
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 300 );
// Ports that are always on
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port1,9,15,18,15 );
ReefAngel.StandardLights( Port2,9,45,18,15 );
ReefAngel.StandardLights( Port3,10,15,17,30 );
ReefAngel.StandardLights( Port4,10,45,18,0 );
ReefAngel.StandardFan( Port5,252,260 );
ReefAngel.StandardHeater( Port6,250,255 );
ReefAngel.PWM.SetDaylight( MoonPhase() );
ReefAngel.PWM.SetActinic( MoonPhase() );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Express Reef" );
ReefAngel.ShowInterface();
}
Re: How to get Lights on/off on RA controller?
The standard RA doesn't have enough memory to have both wifi and standard menu, so you will need to pick one or the other.
The other solution is to upgrade to RA+.
The other solution is to upgrade to RA+.
Roberto.
- Express Reef
- Posts: 51
- Joined: Thu Mar 21, 2013 2:19 am
- Location: South Africa
Re: How to get Lights on/off on RA controller?
Hi Roberto,
I got the code to work...
#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 <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
ReefAngel.AddStandardMenu();
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 300 );
// Ports that are always on
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port1,9,15,18,15 );
ReefAngel.StandardLights( Port2,9,45,18,15 );
ReefAngel.StandardLights( Port3,10,15,17,30 );
ReefAngel.StandardLights( Port4,10,45,18,0 );
ReefAngel.StandardFan( Port5,252,260 );
ReefAngel.StandardHeater( Port6,250,255 );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Express Reef" );
ReefAngel.ShowInterface();
}
I Just took out the following
ReefAngel.PWM.SetDaylight( MoonPhase() );
ReefAngel.PWM.SetActinic( MoonPhase() );
I got the code to work...
#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 <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
ReefAngel.AddStandardMenu();
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 300 );
// Ports that are always on
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port1,9,15,18,15 );
ReefAngel.StandardLights( Port2,9,45,18,15 );
ReefAngel.StandardLights( Port3,10,15,17,30 );
ReefAngel.StandardLights( Port4,10,45,18,0 );
ReefAngel.StandardFan( Port5,252,260 );
ReefAngel.StandardHeater( Port6,250,255 );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Express Reef" );
ReefAngel.ShowInterface();
}
I Just took out the following
ReefAngel.PWM.SetDaylight( MoonPhase() );
ReefAngel.PWM.SetActinic( MoonPhase() );
- Express Reef
- Posts: 51
- Joined: Thu Mar 21, 2013 2:19 am
- Location: South Africa
Re: How to get Lights on/off on RA controller?
How Can I edit the default menue?
- Express Reef
- Posts: 51
- Joined: Thu Mar 21, 2013 2:19 am
- Location: South Africa
Re: How to get Lights on/off on RA controller?
Hi Roberto,
What can be wrong? When I select Lights Off on my RA Controller nothing happens???
What can be wrong? When I select Lights Off on my RA Controller nothing happens???
Re: How to get Lights on/off on RA controller?
Lights off can be misleading
It doesn't mean turn lights off when it is on. It means cancel the turn on mode.
So, if you use the lights on to override it on, the lights off simply cancels that mode.
It doesn't mean turn lights off when it is on. It means cancel the turn on mode.
So, if you use the lights on to override it on, the lights off simply cancels that mode.
Roberto.