Page 1 of 1

Quick Tips from a newbie, for the newbies...

Posted: Sun Oct 16, 2011 1:31 am
by chase
In no particular order...

1. Memory and PDE files are different. You should only need to upload the memory file once, unless you are modifying things within your memory file. PDE files need to be uploaded each time they are changed, in their entirety. I was initially confused thinking that PDE's add to the running code within the memory config file, not true. I would upload the memory config file, then the pde config file each time I was modifying something with in the PDE (which was not necessary). The PDE code runs your controller based on the coded things within the file. Basically if you upload features a, b, and c with your pde and decide you want to add another feature, d you need to append it to your existing pde making it a,b, c, and d. Simply do that then upload your PDE and you should be good to go. RAGen is a huge help when it comes to initial setup. So until you get comfortable modifying your pde, memory, or features files, I highly suggest using the RAGen application. It's the easiest way to get up and running without knowing anything about coding.

2. pH calibration. REMOVE THE USB CABLE FROM YOUR COMPUTER before calibrating. I couldn't figure out why my probe was consistently reporting inaccurate pH readings, then I stumbled upon this post: http://forum.reefangel.com/viewtopic.ph ... e+ph+probe where Rimai
mentions stray voltage can impact the reading. This is exactly what my issue was, so the minute I unplugged the USB cable from my laptop, the pH went from 7... to ~8.3.

3. Features.h file? When I first tried to enable some stuff (wifi) I had some problems. I did not realize the importance of the ReefAngel_Features.h file. If you hear people talking about this file it's located in your Arduino/libraries/ReefAngel_Features/ directory, called ReefAngel_Features.h It has a bunch of stuff that you need to enable (by removing the //) if you want to use what's in it, (like wifi, WDT, etc).

4. Watchdog Timer. The monitoring-your-pieced-together-forum-based-code-concoction so when you realize your banner isn't updating while at work because the controller crashed and the only thing on is your return pump and heater you don't arrive home to the most expensive sushi you've ever bought can be totally avoided. The watchdog timer is in your ReefAngel_Features.h file and totally saves the day. Since enabling it, which just involved removing the //, I have had no issues whatsoever.

5. Ports 5 and 6. At the moment, the instruction manual doesn't really mention this, but these ports apparently have been designed with some extra stuff to support the rapid/sporadic toggling of wavemakers (pumps). Since you may end up toggling your wavemakers several times a minute, I have mine alternating every 15-30 seconds, use these ports for such activities.

6. Random wavemaker function. This one took me several days going through various posts of which I eventually found a modifiable version of the code I was looking for based off someone's PWM question where they had posted their PDE. So, I'm here to share it with you as one of the coolest, easiest, things to get up and running with your new controller (not to mention my corals absolutely love it).

Code: Select all

    void setup()
    {
       randomSeed(analogRead(0));
        ReefAngel.Init();  //Initialize controller   
        ReefAngel.Timer[1].SetInterval(random(15,35));
        ReefAngel.Timer[1].Start(); 
        ReefAngel.Relay.On(Port5);
    }

    void loop()
    {
        ReefAngel.ShowInterface();

    if ( ReefAngel.Timer[1].IsTriggered() )
          {
            ReefAngel.Timer[1].SetInterval(random(15,35));
            ReefAngel.Timer[1].Start();
            ReefAngel.Relay.Toggle(Port5);
            ReefAngel.Relay.Toggle(Port6);
           }
    }
Basically this uses random times between 15 and 35 to turn port 5 on, while port 6 is toggled off. Once the time elapses port 6 is toggled on for a random time while port 5 is toggled off. I like this because you kind of get 2 timer functions (via the random toggle) while only using 1 timing resource on the controller.

Keep in mind you cannot use the ReefAngel.Wavemaker1(Port5); & ReefAngel.Wavemaker2(Port6); functions because they will interfere with the random stuff. Just comment it out and use the above code if that's what you're going for.

I've been using this code with 2 Hydor Koralia Evolution 750's in my 70 gallon and it works awesome.

7. ATO stuff. This has been one of the most rewarding and time saving things I have been able to implement. There's several posts about the float switches and if you are common folk, like myself, I tend to get rather confused. The following post explains them well along with how to get things working with both the float switches upright (meaning the wires point up out of the water): http://forum.reefangel.com/viewtopic.ph ... 4&start=20 The code Rimai suggested on page 3 I have been using without any issues. Still loving the fact I don't have to dump several gallons of RO/DI in the tank every couple of days, what a pain...now it stays even and more importantly my salinity levels are much more stable. I bought a TOM Aquarium Aqua Lifter Pump (http://www.amazon.com/Aquarium-Lifter-3 ... tsupplies1) that works awesome- it's super quiet and I can't even tell when it's on (have to check my RAClient ATO trending/status).

8. Sometimes the compiler/upload errors out. Don't know why but about 15% of the time it may take 3-4 attempts at compiling or uploading code successfully. If your code is legit it just may take a few times to get it loaded in the controller, and with my experience hasn't been anything to worry about. I just avoid doing anything on my computer while compiling or uploading code.

9. Accessing your controller from the net. If you are sort of router savvy, the site http://dyn.com/dns/dyndns-free/ offers free port-forwarding services. To get this working I setup my wifi adapter port to 80 (default http) and have the dyndns address point to my cable modem's IP addy. Then, within my router I forwarded port 80 requests to my RA wifi adapter LAN IP. So now I can be anywhere with internet access and view/control the status of my tank.

That's about all I can think of for now...as I learn things I'll add to this post, and hopefully others do too. The ReefAngel is an amazing product and puts a lot of options at the users disposal at an unbeatable price. Just gotta get over the learning curve and you'll be maxing out your memory before you know it!

Re: Quick Tips from a newbie, for the newbies...

Posted: Sun Oct 16, 2011 4:06 pm
by psyrob
Chase:
Great stuff...just what the newbie needs...I wish I had this info a month ago!!

On the wavemaker ports, when I run RAGen, it won't let me use outlet 6 for a wavemaker, it is grayed out...It will only let me select port 4 and 5 for wavemaker functions...Am I doing something wrong?

Re: Quick Tips from a newbie, for the newbies...

Posted: Sun Oct 16, 2011 4:08 pm
by psyrob
nevermind, figured it out....now have port 4 running fans, and 5 and 6 the wavemaker...

My own two sense from trial and error, and not as dramatic as Chase's...

1. you have to turn off the listener within the client software to upload code to the controller...within the client software, click Settings->Modify->General->Launch Service Dash: then Click STOP on the listener line...then upload your code, and when your done, go back to the Service Dash and Click on START on the listener line....this is a minor tip, but one that got me frustrated for a while...

Re: Quick Tips from a newbie, for the newbies...

Posted: Fri Jun 29, 2012 11:28 am
by DrewPalmer04
Just an update for anyone using the search function at the top of the site. #6 Wavemaker has been updated and using the above code will cause your relay box to freak out.

Use this instead:

Code: Select all

ReefAngel.WavemakerRandom(Port5,25,60);
 // Turn Port5 on/off random cycles that lasts from 25 to 60 secs
    ReefAngel.Relay.Set(Port6,!ReefAngel.Relay.Status(Port5));
 // Turn Port6 on/off on opposite cycle as Port 5

Re: Quick Tips from a newbie, for the newbies...

Posted: Mon Jul 22, 2013 6:18 pm
by thirty6
great post, looking foward to getting started. im sure ill be back to this one a few times

Re: Quick Tips from a newbie, for the newbies...

Posted: Tue Jul 23, 2013 7:03 am
by binder
thirty6 wrote:great post, looking foward to getting started. im sure ill be back to this one a few times
there is a wealth of knowledge hiding inside these forums....some relevant, some not. things have evolved a lot over the last year or 2. make sure you read up on things. dont be afraid to try out stuff and experiment with the code. theres a lot that the controller can do (just look at lees complete pde topic). try not to get frustrated either....its supposed to be fun :-)
lastly, feel free to ask questions.


Sent from my iPad mini

Re: Quick Tips from a newbie, for the newbies...

Posted: Tue Jul 23, 2013 8:29 am
by lnevo
Points 3 and 4 in that post specifically are outdated. You no longer have to worry about the features.h file and the watchdog is automatically added now.

I'll make sure your up and running! gotta take care of my MR peeps!

Re: Quick Tips from a newbie, for the newbies...

Posted: Fri Jan 03, 2014 12:33 pm
by saf1
DrewPalmer04 wrote:Just an update for anyone using the search function at the top of the site. #6 Wavemaker has been updated and using the above code will cause your relay box to freak out.

Use this instead:

Code: Select all

ReefAngel.WavemakerRandom(Port5,25,60);
 // Turn Port5 on/off random cycles that lasts from 25 to 60 secs
    ReefAngel.Relay.Set(Port6,!ReefAngel.Relay.Status(Port5));
 // Turn Port6 on/off on opposite cycle as Port 5
Old thread I'm sure but is it possible to add a option so there is a time that neither is on? I like the switching back and forth but was hoping to have a way to do if, then, or else so that somewhere in between the on/off there is a time that neither is on.

Posted: Mon Jan 06, 2014 11:04 am
by binder
saf1 wrote:
DrewPalmer04 wrote:Just an update for anyone using the search function at the top of the site. #6 Wavemaker has been updated and using the above code will cause your relay box to freak out.

Use this instead:

Code: Select all

ReefAngel.WavemakerRandom(Port5,25,60);
 // Turn Port5 on/off random cycles that lasts from 25 to 60 secs
    ReefAngel.Relay.Set(Port6,!ReefAngel.Relay.Status(Port5));
 // Turn Port6 on/off on opposite cycle as Port 5
Old thread I'm sure but is it possible to add a option so there is a time that neither is on? I like the switching back and forth but was hoping to have a way to do if, then, or else so that somewhere in between the on/off there is a time that neither is on.
yes there is. it is best if you create a separate topic asking your question and provide examples as to what you want to do. if you already have done this, great and ignore my comment :-)

now just to give you a little example, you could do something like :

Code: Select all

if(hour()>20 || hour()<4) {
ReefAngel.Relay.Set(Port5, 0);
ReefAngel.Relay.Set(Port6, 0);
} else {
ReefAngel.WavemakerRandom(Port5,25,60);
 // Turn Port5 on/off random cycles that lasts from 25 to 60 secs
    ReefAngel.Relay.Set(Port6,!ReefAngel.Relay.Status(Port5));
 // Turn Port6 on/off on opposite cycle as Port 5
}
You will need to verify this but it should turn off both ports between 8pm and 4am. Otherwise it alternates them. you should check the usage of the set function because i cannot while on my tablet.
I would start with this example and create a new topic and go from there.

Sent from my Nexus 7

Re: Quick Tips from a newbie, for the newbies...

Posted: Sat Jan 11, 2014 4:56 pm
by AnesthDoc
Inevo, A question from a newbie,
I am taking my first steps and used the Wizard for the basic commands.
If I want to use your code "Lee's PDE", how do I install it on my controller.
Would you please walk me through?

Re: Quick Tips from a newbie, for the newbies...

Posted: Sat Jan 11, 2014 5:30 pm
by lnevo
My code isn't really plug and play. It does a lot of things specific to my setup.

On the other hand its broken up very modularly by using separate functions to organize all the code i have.

My recommendation is to start with the wizard and having all use the internal memory path.

Then i would recommend looking at the function you want to copy from my code and cut and paste that function.

You will need whatever #defines I have for the custom memory locations I use. You'll need to initialize them. The easiest way is through the android app or direct http calls. Or you can write them in the setup() function. Don't use the init_memory function, i have without understanding what it does.

It will also be much easier to customize if you focus on the one function at a time that you'd be adding and much easier for me to help you than trying to do it in one bang.

Re: Quick Tips from a newbie, for the newbies...

Posted: Sun Aug 17, 2014 6:36 am
by Sleepingtiger
so tell me if i got this right. for users that doesn't have the wifi module, using the internal memory path is unnecessary because if you do need to change a function, you will still need to hook it up to your computer and upload the new code. might as well upload your pde file instead.

where as if you did have the wifi module, u can make changes to your function without ever having to upload your new pde files???

Re: Quick Tips from a newbie, for the newbies...

Posted: Sun Aug 17, 2014 7:30 am
by lnevo
Essentially :)

Re: Quick Tips from a newbie, for the newbies...

Posted: Thu Sep 11, 2014 11:41 am
by Mako56
Boy disicions disicions it sure would be nice to have my tank controlled again I surrender hope I chose the right product.