RF Expansion Module

Expansion modules and attachments

Posts: 43
Joined: Wed Jan 02, 2013 11:53 am
PostPosted: Mon Jan 21, 2013 10:26 am
That time the light just turned blue and stays blue. Even after clicking the knob and re-uploading the code generated by running the wizard it stays blue.

Posts: 12200
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Jan 21, 2013 10:32 am
What about this one:
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.SetMode(Slave_Start,0,0);

  InternalMemory.RFMode_write(97);
  InternalMemory.RFSpeed_write(50);
  InternalMemory.RFDuration_write(10);
}

void loop()
{
  ReefAngel.Refresh();
  if (ReefAngel.Joystick.IsButtonPressed())
  {
    ReefAngel.RF.SetMode(Slave_Stop,0,0);
    ReefAngel.LCD.DrawText(0,255,50,60,"Done");
  }
}
Roberto.

Posts: 43
Joined: Wed Jan 02, 2013 11:53 am
PostPosted: Mon Jan 21, 2013 10:39 am
Now the light is off altogether.

Posts: 12200
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Jan 21, 2013 10:47 am
Give me a few hours.
I don't have a RF module on me right now.
Roberto.

Posts: 43
Joined: Wed Jan 02, 2013 11:53 am
PostPosted: Mon Jan 21, 2013 11:10 am
OK, thanks.

Posts: 12200
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Jan 21, 2013 3:47 pm
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 <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=false;
  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");
  }
}

Roberto.

Posts: 43
Joined: Wed Jan 02, 2013 11:53 am
PostPosted: Mon Jan 21, 2013 7:17 pm
We have sycronization! Thanks Roberto!

Posts: 12200
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Jan 21, 2013 7:19 pm
Great!!!
Thanks for informing me about this issue.
Libs 1.0.3 had a slight change on how the modes were handled.
I need to update the VortechSetup code to this one now.
Roberto.
User avatar
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL
PostPosted: Wed Mar 13, 2013 2:06 pm
Stupid question...

If the night mode issue fixed on the RF module?

I want to define different modes based on time...but the logic is backwards....I want to define modes based on get.actinic values throughout the day...

not sure how to pull this off....
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative

Posts: 12200
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Wed Mar 13, 2013 2:26 pm
You can do that.
All you need is make sure set UseMemory to false.
Roberto.
PreviousNext

Return to Addons

Who is online

Users browsing this forum: No registered users and 1 guest

cron