RF Expansion Module

Expansion modules and attachments
pleasemx
Posts: 2
Joined: Thu Nov 15, 2012 2:55 pm

Re: RF Expansion Module

Post by pleasemx »

Hi Roberto,

I'm setting up the RF module. I followed every step on the manual. Now the lcd shows "Assigning Slaves Done".
what should I do right now to have the whole system running? the controller just stays at this "Assigning Slaves Done" stage.

thx!
Xuan
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RF Expansion Module

Post by rimai »

Simply load your code again.
If you have not generated any code yet please use the Reef Angel Wizard to generate the code.
Roberto.
pleasemx
Posts: 2
Joined: Thu Nov 15, 2012 2:55 pm

Re: RF Expansion Module

Post by pleasemx »

rimai wrote:Simply load your code again.
If you have not generated any code yet please use the Reef Angel Wizard to generate the code.
thank you!
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: RF Expansion Module

Post by DrewPalmer04 »

Pretty confused:

I just set up my RF expansion today with this code:

Code: Select all

 if ( hour() > 7 && hour () < 21 )

  {   

    ReefAngel.RF.UseMemory=true;

  }

  if ( hour() > 21 && hour () < 7 )
  {
    ReefAngel.RF.UseMemory=false;
    ReefAngel.RF.SetMode(Night,15,0);  

  else 
  {
    ReefAngel.RF.SetMode(Feeding_Stop,0,0); //Temp fix for coming out of Night mode
    ReefAngel.RF.UseMemory=true;
  }

It works fine from the internal memory, but it's pausing every few cycles...then resumes again??

I have it at the beginning of my loop () {
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: RF Expansion Module

Post by DrewPalmer04 »

Also it just is only showing "feeding mode" in portal and 0 for speed and 0 duration.
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: RF Expansion Module

Post by DrewPalmer04 »

Portal just updated but still pausing randomly between cycles while it's on the internal memory= true mode
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RF Expansion Module

Post by rimai »

Your code doesn't make sense...

Code: Select all

if ( hour() > 7 && hour () < 21 )
  {   
    ReefAngel.RF.UseMemory=true;
  }
This will never be effective, because the next line is an if/else that will null out this line.

Code: Select all

if ( hour() > 21 && hour () < 7 )
The line above will never be true... :( Can't have an hour greater than 9pm AND also less than 7
Roberto.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

RF Expansion Module

Post by lnevo »

Yeah change to OR ||
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: RF Expansion Module

Post by DrewPalmer04 »

Dang. I pasted some old code for times. Oops. Ok I'll work on it. Thanks
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: RF Expansion Module

Post by DrewPalmer04 »

This is more of what I mean't to do:

Code: Select all

//Vortech Setup
  if (ReefAngel.PWM.GetActinicValue()<6) 
  {
    ReefAngel.RF.UseMemory=false;
    ReefAngel.RF.SetMode(Night,15,0);
  }
  else
  {
    ReefAngel.RF.SetMode(Feeding_Stop,0,0); //Temp fix for coming out of Night mode
    ReefAngel.RF.UseMemory=true;
  }


I was messing with other programming and didn't mean to paste that crap... :lol:

Obviously it's in night mode now...but I was still getting that pause I was saying earlier with this code...I'm not sure if it's related to the processing power of the RA and all the stuff I have going on in my loop() or? I'll wait until tomorrow morning and see what the pumps are running like.
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: RF Expansion Module

Post by DrewPalmer04 »

ReefAngel.RF.UseMemory=true; at this time...came out of night mode with no problems but I'm still getting this random pause between cycles...I have them going opposite of eachother by pushing the "mode" button...not sure if this has anything to do with it?
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

RF Expansion Module

Post by lnevo »

What mode are they in?
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: RF Expansion Module

Post by DrewPalmer04 »

Short pulse 33% and 14 duration.
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RF Expansion Module

Post by rimai »

I think the problem is this:

Code: Select all

    ReefAngel.RF.SetMode(Feeding_Stop,0,0); //Temp fix for coming out of Night mode
You can't be calling this all the time. Only when you want to come out of night mode.
Roberto.
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: RF Expansion Module

Post by DrewPalmer04 »

What type of code adjustment do I need? :(
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RF Expansion Module

Post by rimai »

Try this:

Code: Select all

    if (ReefAngel.RF.Mode==Night) ReefAngel.RF.SetMode(Feeding_Stop,0,0); //Temp fix for coming out of Night mode
Roberto.
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: RF Expansion Module

Post by DrewPalmer04 »

Correct as always :lol:

That fixed it right up!! Running smooth now.
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
smoothdog
Posts: 43
Joined: Wed Jan 02, 2013 11:53 am

Re: RF Expansion Module

Post by smoothdog »

How close does the RF module need to be to the vortch wireless contollers? Mine is less than 6 ft away going through the floor and I cannot get it to sync with the vortechs. When I run the vortech module example code the light just goes solid green and the pumps stay in slave seek mode (blue/yellow flash).
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RF Expansion Module

Post by rimai »

I think Ecotech says you must be within 5 feet, but have heard of people running much farther.
I, personally, have ran it at 10 feet with no problems, but it was a straight line and no floor in between.
I'm not sure if their module is strong enough to go through floors.
Roberto.
smoothdog
Posts: 43
Joined: Wed Jan 02, 2013 11:53 am

Re: RF Expansion Module

Post by smoothdog »

ok, but should the RF module blink blue/green after running the vortech example code regardless of wether it 'sees' the vortech controllers? Mine just turns green and stays green, so I don't think it's even trying to pair with the vortech controllers.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RF Expansion Module

Post by rimai »

Yes, the RF module blinking blue/green means that it is waiting for your slave drivers to connect.
It will enter into that mode even if you have no drivers to connect.
Roberto.
smoothdog
Posts: 43
Joined: Wed Jan 02, 2013 11:53 am

Re: RF Expansion Module

Post by smoothdog »

Any thoughts on why mine just turns green and stays green when I run the vortechsetup example code? The light turns green and the display says assigning slaves, if I click the knob I get the done message but the votechs don't reset and stay in pairing mode. I moved the controllers within 2 ft of the RF module and it's nothing but carpet and plywood subfloor between them so that should not be an issue. One other thing I noticed is that when I tried to reset the vortechs for standalone use, they would not pair with each other until I unplugged the RF module. This makes be believe that they are indeed recieving a signal and that the RF module was somehow blocking the pairing between my vortech controllers.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RF Expansion Module

Post by rimai »

You said it blinks blue/green.
It should only turn green, when you press the joystick. Green means constant mode.
Roberto.
smoothdog
Posts: 43
Joined: Wed Jan 02, 2013 11:53 am

Re: RF Expansion Module

Post by smoothdog »

Mine is not blinking blue/green. It just comes on green and stays green.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RF Expansion Module

Post by rimai »

If you plug the RF into your computer usb, does it light up any color?
Roberto.
smoothdog
Posts: 43
Joined: Wed Jan 02, 2013 11:53 am

Re: RF Expansion Module

Post by smoothdog »

It briefly flashes red, then goes off.
smoothdog
Posts: 43
Joined: Wed Jan 02, 2013 11:53 am

Re: RF Expansion Module

Post by smoothdog »

I tried a different cable and got the same results.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RF Expansion Module

Post by rimai »

That's what it is supposed to do...
Let me see if I'm in the same page.
You uploaded VortechSetup and the screen says "Assigning Slaves", right?
The RF module at this point is supposed to be flashing blue/green, but you are saying that yours just stay solid green, is that correct?
Roberto.
smoothdog
Posts: 43
Joined: Wed Jan 02, 2013 11:53 am

Re: RF Expansion Module

Post by smoothdog »

That is correct.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RF Expansion Module

Post by rimai »

What happens when you load this 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 <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(3);
  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.
Post Reply