Tank Upgrade = Revised RA Code, Questions...

Do you have a question on how to do something.
Ask in here.
Post Reply
TanksNStuff
Posts: 188
Joined: Fri Dec 30, 2011 6:57 am

Tank Upgrade = Revised RA Code, Questions...

Post by TanksNStuff »

I've had my RA Plus running for about 2 years now, mostly without any issues. I just upgraded from a 75G to a 120G and I've removed some pieces of equipment (due to addition of a manifold system on the return line) and added a couple dosing pumps.

With the new build, I also made a side cabinet to house all of my RA and other equipment and mounted everything nicely on a back board. In doing this, I reorganized all the plugs and due to cord lengths I will need to move stuff to different relay ports, etc.

Anyway, since I have to redo everything, I decided to use the Wizard to create my new code. It wasn't around when I made my first code so it's my first time using it. It was simple to work thru and I have the basic code completed. I have some questions though, mainly about customizations and how to add them into this code. If you reply to any of them, please include the question number so I can keep track of the responses:

1. Enabled Features - When I did my first code, it listed (commented out) all the features that were enabled by the RAGen program. Does the Wizard do any of this for me or do I need to do it manually?

2. Custom Main Screen - Wizard didn't have any options to enable this. I noticed my old code had a few #define's in there to allow large text, colors, etc. I also noticed the new code has a couple new #include's like <RA_Colors.h> and <RA_CustomColors.h>. Do these replace the old method of manually enabling the custom font stuff and can I just copy/paste my old code into the new one for this to work?

3. ReefAngel.Use2014Screen(); // Let's use 2014 Screen - I noticed this was added to the new code. Is there something new added for custom screens? Can anyone provide a link on info about this feature?

4. Cloud/Lightning Features - I followed some threads a while back about adding this code in, but sort of forgot about it. Is there a link for a thread with currently working code I could add to my .ino? I remember there was a method to add it direct to the dimming module, but I have room on my RA Plus and would prefer to add it to my controller.

5. Dosing Pumps - I have 2 of the 1.1 mL versions from Bulk Reef Supply. The wizard allowed me to set them up for turning on every xx minutes for xx seconds. I also ran the Wizard as using internal memory, because I want to use the Android App for all of my adjustments. Looking at the internal memory locations in the app, I see "Dosing Pump 1 Timer", "Dosing Pump 1 On Hour", "Dosing Pump 1 On Minute", "Dosing Pump 1 Repeat Interval". Which one of these is used to adjust the dosing duration (the "for xx seconds" part)?

6. Delayed on for ATO port - In the Wizard, I used the Single ATO (Low) option. However, I want to set this up with a 5 minute delay after water change and feeding modes. How do I set it up to work off the float switch for normal operation, but have the delay after exiting a mode too?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Tank Upgrade = Revised RA Code, Questions...

Post by rimai »

1. Wizard does it for you
2. Related to #3. Custom screen has been replaced with the new 2014 screen. If you use your joystick, you can now move left and right for more screens. You still have the custom main screen capability if you prefer that. Simply copy and paste your screen into the code and remove the Use2014Screen line from the code.
3. See above. http://forum.reefangel.com/viewtopic.php?f=7&t=3853
4. http://forum.reefangel.com/viewtopic.php?f=12&t=4783
5. Use the Timer and Interval.
6. Will require custom code.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Tank Upgrade = Revised RA Code, Questions...

Post by binder »

1. The wizard/arduino handles this automatically. The custom build of arduino by Roberto has the arduino app process/parse your INO file and it automatically enables the features (features file) based on what you use in your INO file. This will prevent you from forgetting to include something that your code needs.

2. The wizard does not do anything with the custom main screen. You have to manually add it like before. So you should be able to copy and paste things in appropriately. I believe I have done that but don't recall off hand. If I'm wrong, somebody else will chime in.

3. The 2014 screen has been discussed somewhere on here but I don't have the link handy. I'm sure a quick search will yield results for you.

5. I don't have an answer for this one, but looking at the code, here's what I see:

Code: Select all

void ReefAngelClass::DosingPumpRepeat1(byte Relay)
{
	// 0 minute offset
	DosingPumpRepeat(Relay, 0,
			InternalMemory.DP1RepeatInterval_read(),
			InternalMemory.DP1Timer_read());
}
So you would want to use the Dosing Pump Timer to handle the dosing duration.


That's all that I can easily answer for you. Hopefully that helps out and I'm sure others will chime in to answer the remaining questions and update my answers if needed.
TanksNStuff
Posts: 188
Joined: Fri Dec 30, 2011 6:57 am

Re: Tank Upgrade = Revised RA Code, Questions...

Post by TanksNStuff »

Thank you Roberto. I've been away for a while, but nothing has changed. Even after 2 years, you still provide quick responses and great service!

I'll check out the links to do more research, but for now I just have 2 quick follow up questions to your replies:

5. Do the On Hour / On Minute memory locations manage when the dosing begins? (ie., if I wanted the Cal pump to start at noon instead of midnight, will this do that?... or would I need to add the dosing commands in a if/else statement to check the time of day first?) What if I wanted one pump to start at midnight, but end at a certain time and not run all day? Same type of if/else statement required?

6. Figured as much. So, do I just keep it using the Single ATO (Low) designation, but add an if/else statement to check for mode exits and add a delay port command for that port?
TanksNStuff
Posts: 188
Joined: Fri Dec 30, 2011 6:57 am

Re: Tank Upgrade = Revised RA Code, Questions...

Post by TanksNStuff »

Thank you for your reply too Curt. I appreciate the extra insight on the dosing pump commands.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Tank Upgrade = Revised RA Code, Questions...

Post by rimai »

No, the on hour and on time are for single dose function that nobody uses.
Roberto.
TanksNStuff
Posts: 188
Joined: Fri Dec 30, 2011 6:57 am

Re: Tank Upgrade = Revised RA Code, Questions...

Post by TanksNStuff »

Oh, OK. Thanks for the clarification Roberto.
TanksNStuff
Posts: 188
Joined: Fri Dec 30, 2011 6:57 am

Re: Tank Upgrade = Revised RA Code, Questions...

Post by TanksNStuff »

Hmm, looks like the cloud/lightning code is working great for Colin... except it's only good for the standard RA dimmer ports.

I have the Dimmer Expansion so I guess I'll have to keep that on hold until Lee or Colin can provide a version that works with the expansion dimmer. I think Lee was planning on making it a class so that would simplify it for the rest of us.

Oh, and just thought of one other issue I'm having so far...
I added a 2nd MP40 to my new tank. With the original one still running as a slave to the RF module, I tried to set up the new one as slave also. However, it didn't seem to connect (gave the flashing colors indicating that it didn't get the signal). Do I need to re-run the RF module setup code to match the frequencies or something? I thought that if I just put it in slave mode, it would try to connect to the one already a master, but doesn't appear to be able to.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Tank Upgrade = Revised RA Code, Questions...

Post by rimai »

Yes, you need to run the setup again.
Roberto.
Post Reply