I have the RA setup and running, and the wifi up and running. I have all ports forwarded and can see it weather on my local network or not. It works great in that aspect. I'd like to get the RF setup, I have 2 mp40wes. I've read the manual, but I can't figure out what to do? (as of right now, I really only have the RA controlling the heater, nothing else is plugged in yet, but all ports work great via app, portal, etc.)
My 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 <PAR.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.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit;
// 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 );
// Ports that are always on
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
////// Place additional initialization code below here
ReefAngel.Init(); //Initialize controller
ReefAngel.LCD.DrawText(0,255,20,50,"Assigning Slaves");
ReefAngel.RF.SendData(Slave_Start,0,0);
ReefAngel.RF.UseMemory=true;
InternalMemory.RFMode_write(0);
InternalMemory.RFSpeed_write(128);
InternalMemory.RFDuration_write(10);
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardHeater( Port1,790,800 );
ReefAngel.RF.UseMemory = false;
ReefAngel.RF.SetMode( ReefCrest,80,10 );
////// Place your custom code below here
ReefAngel.Refresh();
if (ReefAngel.Joystick.IsButtonPressed())
{
ReefAngel.RF.UseMemory=true;
ReefAngel.RF.SendData(Slave_Stop,0,0);
ReefAngel.LCD.DrawText(0,255,50,60,"Done");
}
////// Place your custom code above here
}
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 <ReefAngel.h>
//#define Constant 0
//#define Random1 1 // Lagoonal
//#define Random2 2 // Reef Crest
//#define ShortWave 3
//#define LongWave 4
//#define Smart_NTM 5 // Nutrient Transport Mode
//#define Smart_TSM 6 // Tidal Swell Mode
//#define Feeding_Start 7
//#define Feeding_Stop 8
//#define Night 9
//#define Slave_Start 97
//#define Slave_Stop 98
//#define None 99
void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.LCD.DrawText(0,255,20,50,"Assigning Slaves");
ReefAngel.RF.SendData(Slave_Start,0,0);
ReefAngel.RF.UseMemory=true;
InternalMemory.RFMode_write(0);
InternalMemory.RFSpeed_write(128);
InternalMemory.RFDuration_write(10);
}
void loop()
{
ReefAngel.Refresh();
if (ReefAngel.Joystick.IsButtonPressed())
{
ReefAngel.RF.UseMemory=true;
ReefAngel.RF.SendData(Slave_Stop,0,0);
ReefAngel.LCD.DrawText(0,255,50,60,"Done");
}
}
Sorry for being such a noob, thanks for any help, and Happy Thanksgiving!!!