Rf

Expansion modules and attachments
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Rf

Post by reefcycle »

Last problem post I swear. I had RF setup before and thanks to Roberto I figured out that I am a moron. Lol. But when I first plugged in RF it was already solid purple. I have RA+ is there something im missing? I had this setup for long time and I feel like a newb when I have to tweak things.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

It should be good.
Why do you think you may be missing something?
Roberto.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

Can't link them. Don't I need it flashing to make pumps slaves
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

Ahh, if you are trying to sync them, you need to load the VortechSetup code.
File->Sketchbook->Example Codes->VortechSetup
Then, follow the manual for syncing instructions.
Roberto.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

linked vortechs. also linked water level. what a day! heres my question, on forums portal I change modes and it says ok and done, but no speed change. what I do wrong?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

Can I see your code?
You must use UseMemory=true to be able to change on the Portal

Code: Select all

ReefAngel.RF.UseMemory=true;
Roberto.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

I will attempt when I get home @ 545. But I will say one thing since I upgraded to RA + and used wizard instead of old method my heater port 3 was not auto engaging either. Lol I am so not a helpless person usually but I am so lost. And I must thank you rimai for all your help
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

ok since I am a newb at code, how can I send you my code with out going nuts trying to unplug everything? Lol I am so lost.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

Not following....
You can just paste the code in here? :?:
Roberto.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

But I made code then added water level and RF so how do I copy and paste whole code?
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Re: Rf

Post by dbmet »

Open the Arduino App and highlight your code and right click and copy if your on a windows computer?
Then Paste it here for him to see..
d
Image
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

not sure if this is latest but it is close.

Code: Select all

#include <ReefAngel_Features.h>
#include <Globals.h>
#include <Time.h>
#include <OneWire.h>
#include <RA_NokiaLCD.h>
#include <avr/pgmspace.h>
#include <InternalEEPROM.h>
#include <Wire.h>
#include <Memory.h>

RA_NokiaLCD e;

void setup()
{
    e.Init();
    e.Clear(COLOR_WHITE,0,0,132,132);
    e.BacklightOn();

    InternalMemory.OverheatTemp_write( 829 );
    InternalMemory.StdLightsOnHour_write( 0 );
    InternalMemory.StdLightsOnMinute_write( 0 );
    InternalMemory.StdLightsOffHour_write( 18 );
    InternalMemory.StdLightsOffMinute_write( 0 );
    InternalMemory.ActinicOffset_write( 0 );
    InternalMemory.HeaterTempOn_write( 760 );
    InternalMemory.HeaterTempOff_write( 765 );
    InternalMemory.ChillerTempOn_write( 775 );
    InternalMemory.ChillerTempOff_write( 770 );
    InternalMemory.DP1RepeatInterval_write( 60 );
    InternalMemory.DP1Timer_write( 30 );
    InternalMemory.DP2RepeatInterval_write( 65 );
    InternalMemory.DP2Timer_write( 30 );
    InternalMemory.IMCheck_write(0xCF06A31E);
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL+20, MENU_START_ROW*3, "Memory Updated");
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL+25, MENU_START_ROW*6, "You can now");
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL+25, MENU_START_ROW*7, "upload your");
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL+33, MENU_START_ROW*8, "INO code");
}

void loop()
{
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

nope. not it
Roberto.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

Sigh
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

How about I start over. When I goto reef angel select wizard and start from scratch should I do set for code (new users) or set internal memory? After that I select my settings for port 1 time schedule port 2 time schedule port 3 heater port 4 fan port 5 & 6 unused port 7 dosing pump 1 and port 8 dosing pump 2. RF vortech reefcrest and set internal generate successful.
After I did that I resynced the vortechs since they and the RF module where not there and reset water level out of water and in water. When all said and done I have on android app water percentage temp Ph etc. Heaters I have to override lights are way off and need to be manually set and I can read and write memory on android app but when everything set to auto it is either all on or off. On portal it is showing way off options. I know this is something I am doing g completely wrong and I feel so helpless.. do any of those steps sound ridiculous?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

If you want to be able to change settings on the portal or android app, you must choose to store settings on internal memory.
This is what is going to place the correct settings in the memory and should also show the correct settings on both Portal and Android.
If you don't choose internal memory, all apps are just going to start pulling whatever crap is currently stored.
Then at the end, it will show you the code you uploaded, which you can save if you wish or not. You can always generate it again.
Roberto.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

I did that the second time. I will try again when im not exhausted. Ty. I will try again
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

oh here is the latest made code, with port settings and times and vortech control.

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 <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
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;


    // Ports that are always on

    ////// Place additional initialization code below here
    

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

void loop()
{
    ReefAngel.ActinicLights( Port1 );
    ReefAngel.DayLights( Port2 );
    ReefAngel.StandardHeater( Port3 );
    ReefAngel.StandardFan( Port4 );
    ReefAngel.DosingPumpRepeat1( Port7 );
    ReefAngel.DosingPumpRepeat2( Port8 );
    ////// Place your custom code below here
    

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.Portal( "reefcycle" );
    ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // I/O Expansion
    byte bkcolor;
    x = 14;
    y = 21;
    for ( int a=0;a<6;a++ )
    {
      ReefAngel.LCD.DrawCircleOutline( x+(a*20),y,4,COLOR_MEDIUMORCHID );
      if ( ReefAngel.IO.GetChannel(a) ) bkcolor=COLOR_WHITE; else bkcolor=COLOR_GRAY;
      ReefAngel.LCD.FillCircle( x+(a*20),y,2,bkcolor );
    }
    pingSerial();

    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 46, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 46, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 93, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

Good.
You are missing the RF stuff, so just add this to your loop():

Code: Select all

    ReefAngel.RF.UseMemory=true;
Roberto.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

I add that at the end? where shall I put it?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

Code: Select all

    ////// Place your custom code below here
    

    ////// Place your custom code above here
Roberto.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

perfect, one question. got the vortechs working. one question I have water level sensor setup but its not at moment. When I add the code to the RA for expansion I lose my settings
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

??
Can you rephrase?
Roberto.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

water level isnt in the wizard so I have to add the code to RA so I get everything workign except water level with posted code
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

Correct, all you need to do is manually add the water level stuff now.
Roberto.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

where shall I put it? I am looking at the code that worked and not wanting to lose all my progress. I am sorry roberto, I am going to be adding relay expansion since I need more amperage draw for lights and heaters. So I am at least buying stuff lol
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

Use 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 <WaterLevel.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
  // Ports toggled in Feeding Mode
  ReefAngel.FeedingModePorts = 0;
  // Ports toggled in Water Change Mode
  ReefAngel.WaterChangePorts = 0;
  // Ports toggled when Lights On / Off menu entry selected
  ReefAngel.LightsOnPorts = Port1Bit;
  // Ports turned off when Overheat temperature exceeded
  ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit;
  // Use T1 probe as temperature and overheat functions
  ReefAngel.TempProbe = T1_PROBE;
  ReefAngel.OverheatProbe = T1_PROBE;


  // Ports that are always on

  ////// Place additional initialization code below here


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

void loop()
{
  ReefAngel.ActinicLights( Port1 );
  ReefAngel.DayLights( Port2 );
  ReefAngel.StandardHeater( Port3 );
  ReefAngel.StandardFan( Port4 );
  ReefAngel.DosingPumpRepeat1( Port7 );
  ReefAngel.DosingPumpRepeat2( Port8 );
  ////// Place your custom code below here
  ReefAngel.RF.UseMemory=true;


  ////// Place your custom code above here

    // This should always be the last line
  ReefAngel.Portal( "reefcycle" );
  ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
  int x,y;
  char text[10];
  // I/O Expansion
  byte bkcolor;
  x = 14;
  y = 21;
  for ( int a=0;a<6;a++ )
  {
    ReefAngel.LCD.DrawCircleOutline( x+(a*20),y,4,COLOR_MEDIUMORCHID );
    if ( ReefAngel.IO.GetChannel(a) ) bkcolor=COLOR_WHITE; 
    else bkcolor=COLOR_GRAY;
    ReefAngel.LCD.FillCircle( x+(a*20),y,2,bkcolor );
  }
  pingSerial();

  // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
  ReefAngel.LCD.DrawMonitor( 15, 46, ReefAngel.Params,
  ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
  ReefAngel.LCD.DrawMonitor( 15, 46, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
  pingSerial();

    // Water Level
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,75,76, "WL:" );
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,76, ReefAngel.WaterLevel.GetLevel() );
    pingSerial();
  

  // Main Relay Box
  byte TempRelay = ReefAngel.Relay.RelayData;
  TempRelay &= ReefAngel.Relay.RelayMaskOff;
  TempRelay |= ReefAngel.Relay.RelayMaskOn;
  ReefAngel.LCD.DrawOutletBox( 12, 93, TempRelay );
  pingSerial();

  // Date and Time
  ReefAngel.LCD.DrawDate( 6, 122 );
  pingSerial();
}

void DrawCustomGraph()
{
}

Roberto.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

before I mess anything up, this should be sent to RA as is and is all my code or is it need me to add anything else.
reefcycle
Posts: 118
Joined: Wed Apr 04, 2012 6:49 pm
Location: Philadelphia

Re: Rf

Post by reefcycle »

ok posted and water level is there but no vortech control from portal and that custom code is there

NVM now it works! roberto u r the man I am sorry I am so slow
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Rf

Post by rimai »

Cool :)
Roberto.
Post Reply