vortech/radion control

Requests for new functions or software apps
User avatar
Posts: 64
Joined: Tue Mar 20, 2012 2:56 am
PostPosted: Wed Jun 06, 2012 5:16 am
Thanks heaps! :)

I just received my Expansion and R+ with lots of memory! :P
I have really hard time to setup my vortech :?
Finished to swap over the new board and wondering how I can get control of my Radion and the
only code I have is:

Code: Select all
ReefAngel.RF.RadionChannels[Radion_Intensity]=75;
  ReefAngel.RF.RadionChannels[Radion_White]=PWMParabola(12,0,18,0,0,100,0);
  ReefAngel.RF.RadionChannels[Radion_RoyalBlue]=PWMParabola(9,0,22,0,0,100,0);
  ReefAngel.RF.RadionChannels[Radion_Red]=PWMParabola(9,0,22,0,0,5,0);
  ReefAngel.RF.RadionChannels[Radion_Green]=PWMParabola(9,0,22,0,0,10,0);
  ReefAngel.RF.RadionChannels[Radion_Blue]=PWMParabola(10,0,21,0,0,60,0);
  if (second()==0) ReefAngel.RF.RadionWrite();


here is my silly questions:

Where to put it?
internal memory or RA code?
once it's upload, how i can setup storms from any app or java?
thank you so much for your time and help
Slow down to speed up
Image
Image

Posts: 12306
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Wed Jun 06, 2012 7:55 am
Let's start with the vortech.
Did you sync them to the controller?
Roberto.
User avatar
Posts: 64
Joined: Tue Mar 20, 2012 2:56 am
PostPosted: Sat Jun 09, 2012 1:38 am
rimai wrote:Let's start with the vortech.
Did you sync them to the controller?

Hi Roberto:
Yes it does work and I can change the mode by wireless but the radion doesn't sync when I change the mode in the vortech memory :cry:
Slow down to speed up
Image
Image

Posts: 12306
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat Jun 09, 2012 7:32 am
Your radions need to be restored to factory settings.
When you do that, they will pick up the signal from the controller and start adjusting accordingly.
Roberto.
User avatar
Posts: 64
Joined: Tue Mar 20, 2012 2:56 am
PostPosted: Sat Jun 09, 2012 3:53 pm
give me o for awesome!
thanks for your fast reply, i will try tonight.
i am wonder if the storm mode is the same in vortech than Radion?
:o
Slow down to speed up
Image
Image
User avatar
Posts: 64
Joined: Tue Mar 20, 2012 2:56 am
PostPosted: Sun Jun 10, 2012 1:47 am
I have changed to factory settings and does not sync when i change modes in my vortech :(
should I add a new chanel in the memory?
Slow down to speed up
Image
Image
User avatar
Posts: 64
Joined: Tue Mar 20, 2012 2:56 am
PostPosted: Sun Jun 10, 2012 2:14 am
here is:

Code: Select all
// Autogenerated file by RAGen (v1.2.2.171), (05/02/2012 22:36)
// RA_050212_2236.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File:
#define wifi
#define SIMPLE_MENU
#define PWMEXPANSION
#define CUSTOM_MAIN
#define COLORS_PDE
#define ENABLE_ATO_LOGGING
#define RFEXPANSION
#define FONT_8x16
#define NUMBERS_8x16

*/


#include <ReefAngel_Features.h>
#include <RA_Colors.h>
#include <RA_CustomColors.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 <RF.h>
#include <ReefAngel.h>

////// Place global variable code below here
// Globals Needed for Params on Custom Main
byte x,y;
char text[10];




// Globals Needed for RF Mode on Custom Main
byte vtechmode;
boolean bFeeding=false;




byte PWMChannel[]={
0,0,0,0,0,0};

int v;

////// Place global variable code above here

void DrawCustomMain()
{
    // the graph is drawn/updated when we exit the main menu &
    // when the parameters are saved
            //Top Banner
        ReefAngel.LCD.DrawText(COLOR_BLACK, COLOR_SKYBLUE, 9, 2, " Erick&SooZ ReeF ");
               // Display T1 Header Text
        ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,8,14,"Tank");
 
        // Display the T1 Temp Value
        char text[7];
        ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
        ReefAngel.LCD.Clear(255, 4, 21, 37, 37);
        ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE, 255, 4, 24, text, Num8x16);
        pingSerial();

        // Display the T2 Header Text
        ReefAngel.LCD.DrawText(COLOR_CRIMSON,255,52,14,"Room");
 
        // Display the T2 Temp Value
        ConvertNumToString(text, ReefAngel.Params.Temp[T2_PROBE], 10);
        ReefAngel.LCD.Clear(255, 52, 21, 75, 37);
        ReefAngel.LCD.DrawLargeText(COLOR_CRIMSON, 255, 52, 24, text, Num8x16);
        pingSerial();

        // Display pH Header Text
        ReefAngel.LCD.DrawText(COLOR_INDIGO,255,108,14,"pH");
 
        // Display pH Value
        ConvertNumToString(text, ReefAngel.Params.PH, 100);
        ReefAngel.LCD.Clear(255, 94, 21, 106, 37);
        ReefAngel.LCD.DrawLargeText(COLOR_INDIGO, 255, 94, 24, text, Num8x16);
        pingSerial();
       
        // Display Vortech MP40wES Mode Header Text
        ReefAngel.LCD.Clear(DefaultFGColor,5,39,127,39);
        ReefAngel.LCD.DrawText(0,255,18,42,"EcoSmart Vortech");

        // Display EcoSmart Mode Value     
        ReefAngel.LCD.Clear(255, 1, 49, 128, 64);
        if (vtechmode == 0) ReefAngel.LCD.DrawLargeText(COLOR_LIMEGREEN,255,35,50,"Constant");
        else if(vtechmode == 1) ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,42,50,"Lagoon");
        else if (vtechmode == 2) ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,25,50,"Reef Crest");
        else if (vtechmode == 3) ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE,255,22,50,"Short Pulse");
        else if (vtechmode == 4) ReefAngel.LCD.DrawLargeText(COLOR_PINK,255,25,50,"Long Pulse");
        else if (vtechmode == 5) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,8,50,"Nutrient Trnsp.");
        else if (vtechmode == 6) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,23,50,"Tidal Swell");
        else if (vtechmode == 9) ReefAngel.LCD.DrawLargeText(COLOR_WHITE,0,45,50,"Night");
   
       ReefAngel.RF.RadionChannels[Radion_Intensity]=75;
       ReefAngel.RF.RadionChannels[Radion_White]=PWMParabola(12,0,18,0,0,100,0);
       ReefAngel.RF.RadionChannels[Radion_RoyalBlue]=PWMParabola(9,0,22,0,0,100,0);
       ReefAngel.RF.RadionChannels[Radion_Red]=PWMParabola(9,0,22,0,0,5,0);
       ReefAngel.RF.RadionChannels[Radion_Green]=PWMParabola(9,0,22,0,0,10,0);
       ReefAngel.RF.RadionChannels[Radion_Blue]=PWMParabola(10,0,21,0,0,60,0);
       if (second()==0) ReefAngel.RF.RadionWrite();


   
   
     
         byte TempRelay = ReefAngel.Relay.RelayData;
         TempRelay &= ReefAngel.Relay.RelayMaskOff;
         TempRelay |= ReefAngel.Relay.RelayMaskOn;
         ReefAngel.LCD.DrawOutletBox(12, 103, TempRelay);
   

}

void DrawCustomGraph()
{
    ReefAngel.LCD.DrawGraph(5, 5);
}


void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    ReefAngel.SetTemperatureUnit(1);  // set to Celsius Temperature

    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit;

    // Ports that are always on
    ReefAngel.Relay.On(Port2);
    ReefAngel.Relay.On(Port3);
    ReefAngel.Relay.On(Port5);
    ReefAngel.Relay.On(Port7);
    ReefAngel.Relay.On(Port8);
    ////// Place additional initialization code below here
   
   
   

    ////// Place additional initialization code above here
}

void loop()
{
 
   
 
 
 
    // Specific functions that use Internal Memory values
    ReefAngel.SingleATOLow(Port1);
    ReefAngel.StandardLights(Port4);
    ReefAngel.StandardFan(Port6);
    ////// Place your custom code below here
   
   
 


   
    ReefAngel.Portal("pilonstar", "whatupbrah");
   
 
   
//------------------------------ Start Feeding Mode Schedule (Start 1st Feeding at 9:55 AM and 2nd at 1:55 PM)---------------------
    // if the hour is 9a or 1p, minute is 55 and seconds is 0
    // start the feeding mode
    if ( ((hour() == 9) || (hour() == 13)) &&
       (minute() == 55) &&
       (second() == 0) )
    {
      ReefAngel.FeedingModeStart();
      vtechmode = InternalMemory.RFMode_read();     
    }
//------------------------------------------------------ End of Feeding Mode Schedule ---------------------------------------------

//-------------------------------------------------------- Start RF Daytime Control -----------------------------------------------
  if (hour() >=8 && hour() <= 22)
  { 
    if (ReefAngel.DisplayedMenu==FEEDING_MODE) bFeeding=true;
    if (ReefAngel.DisplayedMenu==DEFAULT_MENU && bFeeding )
    {
      bFeeding=false;
      ReefAngel.RF.UseMemory=false;
      ReefAngel.RF.SetMode(Smart_NTM,155,5);
      ReefAngel.Timer[4].SetInterval(1800); // Timer for 30min
      ReefAngel.Timer[4].Start();
      vtechmode = 5;
    }
    if (ReefAngel.DisplayedMenu==DEFAULT_MENU && ReefAngel.Timer[4].IsTriggered())
    {
      ReefAngel.RF.UseMemory=true;
      vtechmode = InternalMemory.RFMode_read();
    } 
  }
//---------------------------------------------------------- End RF Daytime Control -----------------------------------------------   

//-------------------------------------------------------- Start RF Nightmode Control ---------------------------------------------   

  if (hour()>=23 || hour()<7) // Defining "Nightmode" hours for VorTech = between 11 PM and 7 AM
    {
      ReefAngel.RF.UseMemory=false;
      ReefAngel.RF.SetMode(Night,15,0);
      vtechmode = 9;
    }
  else
    {
      ReefAngel.RF.SetMode(Feeding_Stop,0,0); //Temp fix for coming out of Night mode
      ReefAngel.RF.UseMemory=true;
      vtechmode = InternalMemory.RFMode_read();
    }
//---------------------------------------------------------- End RF Nightmode Control ---------------------------------------------
//------------------------------------------------------ End Time-of-Day Based Functions ------------------------------------------




 // This should always be the last line
    ReefAngel.ShowInterface();


}
//--------------------------------------------------------------- End Loop --------------------------------------------------------
//*********************************************************************************************************************************







   

Slow down to speed up
Image
Image

Posts: 12306
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun Jun 10, 2012 6:45 am
:? Confused.
What are you talking about?
The vortechs don't sync or the radions don't sync?
Did you sync the vortechs? Are they working as intended?
Roberto.
User avatar
Posts: 64
Joined: Tue Mar 20, 2012 2:56 am
PostPosted: Mon Jun 11, 2012 2:18 am
rimai wrote::? Confused.
What are you talking about?
The vortechs don't sync or the radions don't sync?
Did you sync the vortechs? Are they working as intended?

Sorry I didn't mean to confused you. :oops:
What happened with my code, I can control the Vortech modes but the
Radion modes doesn't change, it looks like it send a signal to the radion but i doesn't change any
of the modes and i think is my PDE :(
So what I am trying to setup is a code i can change the radion modes like storm mode lighting mode or
day cycle.
Can you help with the modes please?
thanks for your time.
Erick
Slow down to speed up
Image
Image

Posts: 12306
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Jun 11, 2012 7:44 am
Is it dimming?
Roberto.
PreviousNext

Return to Requests

Who is online

Users browsing this forum: No registered users and 0 guests

cron