Page 1 of 2

Re: vortech/radion control

Posted: Wed Jun 06, 2012 5:16 am
by pilonstar
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

Re: vortech/radion control

Posted: Wed Jun 06, 2012 7:55 am
by rimai
Let's start with the vortech.
Did you sync them to the controller?

Re: vortech/radion control

Posted: Sat Jun 09, 2012 1:38 am
by pilonstar
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:

Re: vortech/radion control

Posted: Sat Jun 09, 2012 7:32 am
by rimai
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.

Re: vortech/radion control

Posted: Sat Jun 09, 2012 3:53 pm
by pilonstar
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

Re: vortech/radion control

Posted: Sun Jun 10, 2012 1:47 am
by pilonstar
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?

Re: vortech/radion control

Posted: Sun Jun 10, 2012 2:14 am
by pilonstar
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 --------------------------------------------------------
//*********************************************************************************************************************************







   


Re: vortech/radion control

Posted: Sun Jun 10, 2012 6:45 am
by rimai
:? 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?

Re: vortech/radion control

Posted: Mon Jun 11, 2012 2:18 am
by pilonstar
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

Re: vortech/radion control

Posted: Mon Jun 11, 2012 7:44 am
by rimai
Is it dimming?

Re: vortech/radion control

Posted: Mon Jun 11, 2012 4:51 pm
by pilonstar
Unfortunately not, I'll trying to add radion.memory I the memory with no luck :(

Re: vortech/radion control

Posted: Mon Jun 11, 2012 5:28 pm
by rimai
The radion cannot be programmed to any mode.
You need to reset to factory settings and leave it like that. I think it's called basic mode.
If you have more than 1, you can't sync them together either, or they will just override the RA commands.
In basic mode, they will start accepting the commands from RA.

Re: vortech/radion control

Posted: Sun Aug 12, 2012 4:23 pm
by pilonstar
rimai wrote:The radion cannot be programmed to any mode.
You need to reset to factory settings and leave it like that. I think it's called basic mode.
If you have more than 1, you can't sync them together either, or they will just override the RA commands.
In basic mode, they will start accepting the commands from RA.
Hi Roberto :)
I have updated my memory and it include radion section! Yay!
That means i can try to make the storm mode?
Any chance to copy the mode from the driver?
Storm mode would be amazing! :lol:

Re: vortech/radion control

Posted: Sun Aug 12, 2012 7:26 pm
by rimai
I'm working on that.
Apparently the storm mode is not avaialble the same way as if you were running the ecotech software.

Re: vortech/radion control

Posted: Sun Aug 12, 2012 9:22 pm
by pilonstar
awesome! you are the man with the master plan!
I was trying before fading the white/blue for seconds and it didn't work... just make it go crazy and just
freeze everything...I will keep trying with careful, but with the radion in the memory make the job much more easy.
thanks Mr Rimai! ;)

Re: vortech/radion control

Posted: Wed Aug 15, 2012 9:14 pm
by rimai
You will need to update firmware on your module.
  • Download and unzip the attached file.
  • Edit the file updateStorm.bat on notepad or your prefered editor.
  • Change the COM port to the same one you use to upload codes to RA.
  • Save and close the file.
  • Open the module
  • Remove the Ecotech RF module
  • Connect the USB-TTL cable like in this photo: http://i761.photobucket.com/albums/xx25 ... 144436.jpg
  • Double-click the file updateStorm.bat to execute it.
  • You will see the module blinking red just like you were uploading code to RA.
  • When done uploading, plug the Ecotech RF module back in.
  • Close the module
After you update the firmware, you can just change the mode of the module to 10 (Storm mode).
This will generate a unique mode, only available to RA users, which pulses the Vortech pumps differently and also will trigger lighttning effects on the Radion fixtures :shock:

Re: vortech/radion control

Posted: Fri Aug 17, 2012 12:02 am
by pilonstar
Mr Rimai, you are a Genius! :shock:
thank you so much! Really appreciated! :D

Re: vortech/radion control

Posted: Sun Aug 26, 2012 8:23 am
by rimai
If you ever want to go back to the original firmware, here it is.

Re: vortech/radion control

Posted: Tue Aug 28, 2012 2:13 am
by pilonstar
rimai wrote:If you ever want to go back to the original firmware, here it is.
Excellent, I had a few issues with the modes and the firmware when I tried to install.
I am running windows in a virtual machine and I didn't have libusb0.dll. At the beginning
the Ms-dos windows just closed in two seconds so I add this to the .dat file:

Code: Select all

@echo off
cmd
and then I could read the error.

Thank you so much Roberto again, I will post a video with the storm mode soon.

:D

Erick.

Re: vortech/radion control

Posted: Thu Sep 06, 2012 9:59 pm
by alexwbush
Is there a way to add more points on the light spectrum curves?

I am trying to recreate this:
Image

Re: vortech/radion control

Posted: Fri Sep 07, 2012 7:37 am
by rimai
Can I really be honest??
You can, it will take a bit of coding and will look very messy and confusing, but doable.
You need one slope function for each point.
What I find it interesting is that if you smooth out that shape into a parabola looking wave form, which we already have, it will look very similar with very minimal margin of deviance and I personally think that corals and the human eye can't detect that deviance.
If you still want to go through with several points, we can give it a shot.

Re: vortech/radion control

Posted: Fri Sep 07, 2012 1:39 pm
by alexwbush
very true roberto. I built something similar, but had to disable rf module for space. I'll test it when I get my RA+ back on this tank. I would love to do mooncycle too without messing with the parabola too much. Any ideas other than give up one of the light spectrums?

Re: vortech/radion control

Posted: Fri Sep 07, 2012 3:09 pm
by rimai
What do you mean give up light spectrum?
You can use the blue channel and leave it to 1 or 2% to use it as moonlights.
I don't think you will be able to get a mooncycle out of the Radion. You will have to test it in your tank.
I find it too bright, but I'm used to very very dim moonlights too. I prefer it that way, so I use the RA dimmable moonlights to do the moon cycles instead of Radions.

Re: vortech/radion control

Posted: Sat Sep 08, 2012 2:27 pm
by alexwbush
rimai wrote:What do you mean give up light spectrum?
You can use the blue channel and leave it to 1 or 2% to use it as moonlights.
I don't think you will be able to get a mooncycle out of the Radion. You will have to test it in your tank.
I find it too bright, but I'm used to very very dim moonlights too. I prefer it that way, so I use the RA dimmable moonlights to do the moon cycles instead of Radions.
When using the wizard to setup, you have to select a pattern (parabola, moonlights, etc) and you can't select both. I am thinking you mean I'd have to hard code it. I'll play with it some more when I get my RA+ back.

Re: vortech/radion control

Posted: Sat Sep 08, 2012 3:46 pm
by rimai
Yeah, you will need to hard code that.