Page 1 of 1

paradise trouble

Posted: Tue Apr 10, 2012 6:04 pm
by reefcycle
ok, so I finally figured out basics after rereading manuals 30 times! :) I finally made my code and it says sketch to big. so I am curious if it is because I uploaded to many codes? When you generate compile and send code does the code just keep on adding and adding? if so how do I reset device and try again?

Re: paradise trouble

Posted: Tue Apr 10, 2012 6:06 pm
by reefcycle

Code: Select all

// Autogenerated file by RAGen (v1.2.2.171), (04/10/2012 21:00)
// RA_041012_2100.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define DisplayLEDPWM
#define wifi
#define SIMPLE_MENU
#define RFEXPANSION
*/


#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 <RF.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 turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;

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

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

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

    ////// Place your custom code above here
    // This sends all the data to the portal
    // Do not add any custom code that changes any relay status after this line
    // The only code after this line should be the ShowInterface function
    ReefAngel.Portal("reefcycle", "zzxx4118");

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

Re: paradise trouble

Posted: Tue Apr 10, 2012 6:18 pm
by rossbryant1956
yes, it is something like that. I read somewhere on here that Arduino caches code to "help" you do things faster. Make sure your production copy of your code is saved, exit everything and restart and try to reload. This should do it

Re: paradise trouble

Posted: Tue Apr 10, 2012 6:46 pm
by reefcycle
ok so I restarted and power cycled and uploaded new code successfully, now I unplug and still have the Memory Updated upload your INO code. I read that could be custom menu/simple menu and I corrected it to simple menu but no fix. what to do?

Code: Select all

// Autogenerated file by RAGen (v1.2.2.171), (04/10/2012 21:51)
// RA_041012_2151.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DisplayImages
#define wifi
#define SIMPLE_MENU
#define RFEXPANSION
*/


#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 <RF.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 turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;

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

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

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

    ////// Place your custom code above here
    // This sends all the data to the portal
    // Do not add any custom code that changes any relay status after this line
    // The only code after this line should be the ShowInterface function
    ReefAngel.Portal("reefcycle", "zzxx4118");

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

Re: paradise trouble

Posted: Tue Apr 10, 2012 8:41 pm
by reefcycle
uploadfromtaptalk1334115664910.jpg
uploadfromtaptalk1334115664910.jpg (28.02 KiB) Viewed 8330 times
Sent from my MB865 using Tapatalk 2

Re: paradise trouble

Posted: Tue Apr 10, 2012 9:54 pm
by rimai
To reduce the size, open RAGen, move to features tab and make sure you have simple menu checked.
The screen shot says that you have uploaded the initial internal memory code.
Now, you need to go to RAGen, generate a code and upload it. You could also use one of the example codes to check them out.

Re: paradise trouble

Posted: Wed Apr 11, 2012 5:57 am
by reefcycle
Ok so I am so a newb. I could be completely off . I read the pdf's and opened ragen and followed the instructions. Uploaded code and still got the memory updated error again. I am trying ultimately to write a code for simple basic timer for actinic and mh. I was going to add options as I got more comfortable.

Re: paradise trouble

Posted: Wed Apr 11, 2012 8:01 am
by rimai
I don't think the code is being uploaded right if the screen doesn't change.
Do you have any error code at the bottom with red letters?

Re: paradise trouble

Posted: Wed Apr 11, 2012 8:27 am
by reefcycle
Ok so I uploaded internal memory code as the where to start guide informs. And then I went to features clicked options I thought I needed and originally had custom menu selected. Then switched to simple menu. And then modified relay ports to adhere to my lights (actinic and metal halides) generated the code and then verified and then uploaded code. I got the upload complete no errors and same screen. After uploading code is there a proper reset or reboot that I am missing maybe?

Sent from my MB865 using Tapatalk 2

Re: paradise trouble

Posted: Wed Apr 11, 2012 9:34 am
by rimai
No, it should not need it. It will always use whatever code is being uploaded last.
Can I see the code you are trying to upload?

Re: paradise trouble

Posted: Wed Apr 11, 2012 11:30 am
by reefcycle
the code I posted this is the last thing I tried to enter

Code: Select all

// Autogenerated file by RAGen (v1.2.2.171), (04/10/2012 21:51)
// RA_041012_2151.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File:
#define DisplayImages
#define wifi
#define SIMPLE_MENU
#define RFEXPANSION
*/


#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 <RF.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 turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;

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

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

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

    ////// Place your custom code above here
    // This sends all the data to the portal
    // Do not add any custom code that changes any relay status after this line
    // The only code after this line should be the ShowInterface function
    ReefAngel.Portal("reefcycle", "zzxx4118");

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

Re: paradise trouble

Posted: Wed Apr 11, 2012 12:17 pm
by rimai
Ok, can you copy and paste what Arduino showing you at the bottom on red letter?

Re: paradise trouble

Posted: Wed Apr 11, 2012 12:50 pm
by reefcycle
I will when I go home. Here's a question after opening arduino and plugging in reef angel how do I access code that is current on controller

Re: paradise trouble

Posted: Wed Apr 11, 2012 12:54 pm
by rimai
You can't.
But you should have the source code saved on your computer though.

Re: paradise trouble

Posted: Wed Apr 11, 2012 3:30 pm
by reefcycle
in ragen internal memory code created and loaded sucess

Code: Select all

// Autogenerated file by RAGen (v1.2.2.171), (04/11/2012 18:39)
// Memory_041112_1839.ino
//
// This file sets the default values to the Internal Memory
//


#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.MHOnHour_write(13);
    InternalMemory.MHOnMinute_write(0);
    InternalMemory.MHOffHour_write(19);
    InternalMemory.MHOffMinute_write(0);
    InternalMemory.StdLightsOnHour_write(9);
    InternalMemory.StdLightsOnMinute_write(0);
    InternalMemory.StdLightsOffHour_write(20);
    InternalMemory.StdLightsOffMinute_write(0);
    InternalMemory.WM1Timer_write(200);
    InternalMemory.WM2Timer_write(354);
    InternalMemory.DP1Timer_write(10);
    InternalMemory.DP2Timer_write(10);
    InternalMemory.FeedingTimer_write(900);
    InternalMemory.LCDTimer_write(600);
    InternalMemory.OverheatTemp_write(1500);
    InternalMemory.LEDPWMDaylight_write(50);
    InternalMemory.LEDPWMActinic_write(50);
    InternalMemory.HeaterTempOn_write(780);
    InternalMemory.HeaterTempOff_write(791);
    InternalMemory.ChillerTempOn_write(810);
    InternalMemory.ChillerTempOff_write(785);
    InternalMemory.ATOTimeout_write(60);
    InternalMemory.PHMax_write(840);
    InternalMemory.PHMin_write(550);
    InternalMemory.MHDelay_write(5);
    InternalMemory.DP1OnHour_write(20);
    InternalMemory.DP1OnMinute_write(0);
    InternalMemory.DP2OnHour_write(22);
    InternalMemory.DP2OnMinute_write(30);
    InternalMemory.ATOHourInterval_write(0);
    InternalMemory.ATOHighHourInterval_write(0);
    InternalMemory.ATOHighTimeout_write(60);
    InternalMemory.DP1RepeatInterval_write(0);
    InternalMemory.DP2RepeatInterval_write(0);
    InternalMemory.SalMax_write(2550);
    InternalMemory.PWMSlopeStartD_write(15);
    InternalMemory.PWMSlopeEndD_write(100);
    InternalMemory.PWMSlopeDurationD_write(60);
    InternalMemory.PWMSlopeStartA_write(15);
    InternalMemory.PWMSlopeEndA_write(100);
    InternalMemory.PWMSlopeDurationA_write(60);
    InternalMemory.RFMode_write(0);
    InternalMemory.RFSpeed_write(100);
    InternalMemory.RFDuration_write(10);
    InternalMemory.PWMSlopeStart0_write(15);
    InternalMemory.PWMSlopeEnd0_write(100);
    InternalMemory.PWMSlopeDuration0_write(60);
    InternalMemory.PWMSlopeStart1_write(15);
    InternalMemory.PWMSlopeEnd1_write(100);
    InternalMemory.PWMSlopeDuration1_write(60);
    InternalMemory.PWMSlopeStart2_write(15);
    InternalMemory.PWMSlopeEnd2_write(100);
    InternalMemory.PWMSlopeDuration2_write(60);
    InternalMemory.PWMSlopeStart3_write(15);
    InternalMemory.PWMSlopeEnd3_write(100);
    InternalMemory.PWMSlopeDuration3_write(60);
    InternalMemory.PWMSlopeStart4_write(15);
    InternalMemory.PWMSlopeEnd4_write(100);
    InternalMemory.PWMSlopeDuration4_write(60);
    InternalMemory.PWMSlopeStart5_write(15);
    InternalMemory.PWMSlopeEnd5_write(100);
    InternalMemory.PWMSlopeDuration5_write(60);
    InternalMemory.IMCheck_write(0x5241494D);
}

void loop()
{
    // display success screen
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*2, "Internal Memory Set");
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*4, "Now load your");
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*5, "   RA code file");
    delay(5000);
}
red part

Code: Select all

Binary sketch size: 5584 bytes (of a 32256 byte maximum)
C:\Program Files\Reef Angel Controller\hardware/tools/avr/bin/avrdude -CC:\Program Files\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\\.\COM5 -b115200 -D -Uflash:w:C:\Users\ADMINI~1\AppData\Local\Temp\build8844919463936784050.tmp\Memory_041112_1839.cpp.hex:i 

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: 
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.


Re: paradise trouble

Posted: Wed Apr 11, 2012 3:34 pm
by reefcycle
then the controller tab generate

Code: Select all

// Autogenerated file by RAGen (v1.2.2.171), (04/11/2012 18:43)
// RA_041112_1843.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DisplayImages
#define wifi
#define SIMPLE_MENU
#define RFEXPANSION
*/


#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 <RF.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 turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;

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

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

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

    ////// Place your custom code above here
    // This sends all the data to the portal
    // Do not add any custom code that changes any relay status after this line
    // The only code after this line should be the ShowInterface function
    ReefAngel.Portal("reefcycle", "zzxx4118");

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

Code: Select all

Binary sketch size: 29406 bytes (of a 32256 byte maximum)
C:\Program Files\Reef Angel Controller\hardware/tools/avr/bin/avrdude -CC:\Program Files\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\\.\COM5 -b115200 -D -Uflash:w:C:\Users\ADMINI~1\AppData\Local\Temp\build8321643892134354867.tmp\RA_041112_1843.cpp.hex:i 

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: 
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.


Re: paradise trouble

Posted: Wed Apr 11, 2012 7:13 pm
by reefcycle
ok I loaded initial internal memory
and then loaded template
same picture

WTF

Re: paradise trouble

Posted: Wed Apr 11, 2012 7:40 pm
by reefcycle
ok tried another laptop and tried setups I am going to flip...

Re: paradise trouble

Posted: Wed Apr 11, 2012 7:46 pm
by rimai
The red log tells me that it is not uploading the code.

Re: paradise trouble

Posted: Wed Apr 11, 2012 7:52 pm
by reefcycle
What do u recommend then?

Re: paradise trouble

Posted: Thu Apr 12, 2012 6:47 am
by reefcycle
Ty rimai for helping me last night! One last q. My time is off. Is there a simple way to correct date n time without messing with it and rewriting scripts or is that required?

Re: paradise trouble

Posted: Thu Apr 12, 2012 7:47 am
by rimai
You can do with the android phone or portal.
I think wolfador is trying to get that feature available in the iPhone too.

Re: paradise trouble

Posted: Thu Apr 12, 2012 7:54 am
by reefcycle
I believe my wifi timed out. Getting bad URL. Ill check it later. But I use Android so when I get it all live again I try

Re: paradise trouble

Posted: Thu Apr 12, 2012 4:46 pm
by reefcycle
ok everything works, but heres the question I have, when my cell is on the same wifi as my reef angel, I get live views every time I refresh on the app. as soon as I attempt to connect after removing my cell from wifi it doesnt connect. what should I do or what am I missing?

Re: paradise trouble

Posted: Thu Apr 12, 2012 7:24 pm
by wolfador
reefcycle wrote:ok everything works, but heres the question I have, when my cell is on the same wifi as my reef angel, I get live views every time I refresh on the app. as soon as I attempt to connect after removing my cell from wifi it doesnt connect. what should I do or what am I missing?

you may be using your internal address on your phone, you should use your external IP. It is easiest to configure a url at dyndns.com

Re: paradise trouble

Posted: Fri Apr 13, 2012 5:38 am
by reefcycle
Hey wolfador, I believe you are correct, but before I pay 20 for a dyndns, what do I need to do to make it work? do I need to keep a computer linked to the RA? Lol I am such a newb, p.s. I am an auto mechanic, if anyone needs advice I will happily help as a return favor! :)
Mike

Re: paradise trouble

Posted: Fri Apr 13, 2012 6:46 am
by wolfador
reefcycle wrote:Hey wolfador, I believe you are correct, but before I pay 20 for a dyndns, what do I need to do to make it work? do I need to keep a computer linked to the RA? Lol I am such a newb, p.s. I am an auto mechanic, if anyone needs advice I will happily help as a return favor! :)
Mike

It looks like dyndns may have gotten rid of the free accounts. You can use http://www.no-ip.com/services/managed_d ... c_dns.html just open a free account and point it to your "external ip address". You can find that by going to http://www.whatismyip.com/ from your home computer.

After that you will need to open the firewall port (2000) on your router/modem and point it to the "internal" address that you have been currently using. You can find the guide for your router at:
http://portforward.com/english/routers/ ... rindex.htm

Re: paradise trouble

Posted: Fri Apr 13, 2012 7:42 am
by rimai
No need for DDNS anymore :)
http://forum.reefangel.com/viewtopic.php?p=8307#p8307
I've made a change on the server.
It only working for users that have populated the field in the past and then blanked it out.
I still gotta find some time to troubleshoot the bug that is causing it to not populate the field if it does not exist in the database.

Re: paradise trouble

Posted: Sun Apr 15, 2012 9:57 am
by binder
reefcycle wrote:Hey wolfador, I believe you are correct, but before I pay 20 for a dyndns, what do I need to do to make it work? do I need to keep a computer linked to the RA? Lol I am such a newb, p.s. I am an auto mechanic, if anyone needs advice I will happily help as a return favor! :)
Mike
You won't need to pay 20 for a dyndns account. I would use the free no-ip.com account instead. I've got both a no-ip and a dyndns account (had the dyndns account for many years). That's only necessary if you are wanting to use the android app. Like Roberto said, the portal uses the IP address automatically.

Re: paradise trouble

Posted: Sun Apr 15, 2012 1:23 pm
by reefcycle
Ty guys. I worked it out. Just had a weird firmware on my router. But full on working.