Page 2 of 3

Re: Documentation

Posted: Fri Feb 06, 2015 10:35 pm
by Naptalene
lnevo wrote:Yeah sorry just trying to understand the laymen's perspective. I frequently don't think about naming ports for the portal or screen than i do for usage in the code....just trying to follow the other view.
I'm on the opposite side of the fence :)

cosmith71 wrote:One way to do it would be to break it down into systems.

Relays, programming relays, naming relays, dosing pumps, etc...

DC Pumps, modes and programming.

PWM lighting

etc
That's what I was thinking. So it's easy to find an explanation and examples for the single thing a user is trying to do.
lnevo wrote:I think screen labels are generic we should have a section for naming things and break out the different kinds of naming :)
Perfect. Nice and easy for a non programmer to think in terms of "skimmer" not "port3"

It's the weekend and kids time:)
I'll go through the units and try draw up a draft of subheadings, then you guys can change it and I'll re-submit it. Give me day or 2 :D

Re: Documentation

Posted: Tue Feb 10, 2015 1:42 pm
by Jim_J
Im an normal user with some experience of programming, and Ive been spending the last two days spawning the forums for explanations how to use different functions or classes, so i think a wiki like you're talking about would be great!
Just a simple thing like knowing how to use the DCPump class, and what arguments the different modes expecting is a dreadful task to find info about. I guess its possible to find out if you know how to read and understanding the libraries, but in my case i don't understand so much :)

Re: Documentation

Posted: Thu Feb 12, 2015 5:40 am
by Naptalene
Here's what I was thinking.....

Been very busy so it's all I've been able to do (I did it from memory at work so I may have gotten navigation wrong :roll: ) but imagine each unit in this style, with a list as just mentioned and links to the wiki?

Do I continue? I'll obviously ensure that everything is as correct as possible.


ReefAngel

1. Head Unit

1. PH Probe

1.1 Standard Setup

The Reef Angel Controller comes standard with one PH port and a PH probe.
This allows you to moniter your PH and plot graphs via the Portal.
The probe is connected via a standard BNC connector.
Once you have applied power to the RA you should see numerical values under the “PH” heading.
The next step is to calibrate the Probe. This will ensure you get the correct PH reading and will require Stock PH solutions of PH7 & PH10 which most LFS' carry.

Push down on the HeadUnit's joystick and you will enter the “Settings” page.
Scroll down to PH calibration.
Push the joystick to begin the calibration.
Place the PH probe in the PH7 solution and let it sit until the values stabalise.
Push the Joystick
Clean the probe with some RO water
Place the PH probe in the PH10 solution and let it sit
Push the Joystick.
Clean the Probe with Some RO water.
Your PH probe is now calibrated and ready to be placed in a probe holder in your tank.

1.2 Setup for Marine tanks using PH4 & PH7 Solutions

In some areas a PH10 solution can be difficult to obtain. In this event the RAcode for PH calibration allows the user to use PH4 and PH7 stock solutions.
This will require you to enter values into the Code line, but is a very straight-forward procedure.

As before, scroll with joystick and push down on it to enter the settings page.
Select PH calibration and click begin calibration.
Place the PH probe in the PH4 solution and wait for the values to stabalise.
Write down the value.
Push the Joystrick
Clean the Probe with some RO water.
Place the PH probe in the PH7 solution and wait for the values to stabalise.
Write down the value.
Push the joystick.
Your PH will now give an eroneous reading, don't worry.

Subtract the first value (PH4 solution) from the second value (PH7 solution) which will give us the difference.
Now add this Difference value to the PH7 value you wrote down, which will give you your PH10 value.

Now all you need to do is add the following line in your code via the code editor:

Please insert correct code lines here

Now turn off the RA, plug the USB cable in and upload the code.
The PH probe is now calibrated and should give you correct values.

1.3 Commonly requested PH code:

I need to see if this is a valid Title
Do guys use the RA for CO2 Reactors?

1.4 Helpful links:

1.4.1. Connecting your computer to the Reef Angel
1.4.2. The code editor
1.4.3. PH Expansion unit

Re: Documentation

Posted: Thu Feb 12, 2015 5:44 am
by Naptalene
Jim_J wrote:Im an normal user with some experience of programming, and Ive been spending the last two days spawning the forums for explanations how to use different functions or classes, so i think a wiki like you're talking about would be great!
Just a simple thing like knowing how to use the DCPump class, and what arguments the different modes expecting is a dreadful task to find info about. I guess its possible to find out if you know how to read and understanding the libraries, but in my case i don't understand so much :)
I think we're in the same boat.
And if we do it in a manual style as above I think a guy who has never seen code in his life will be less intimidated.

Re: Documentation

Posted: Thu Feb 12, 2015 6:26 am
by cosmith71
On the pH calibration, make sure you add to move the joystick to the OK button before you press the button in. It defaults to cancel.

--Colin

Re: Documentation

Posted: Thu Feb 12, 2015 6:57 am
by Naptalene
No problem, I'll check all that sort of stuff properly, but as a style of doing documentation are you happy with me to continue? And the more people that can proof read the better.

Re: Documentation

Posted: Thu Feb 12, 2015 9:24 am
by rimai
I like it :) I think you are in for a good start!!!
1.2 is actually much easier than that using the new libraries.
If you move the joystick to right until it reaches the pH number (7 or 10 by default), you can change it to whatever value you wish :)
Give it a try.

Re: Documentation

Posted: Thu Feb 12, 2015 4:10 pm
by Jim_J
Looking good Naptalene! Thumbs up :)

Re: Documentation

Posted: Fri Feb 13, 2015 5:15 am
by Naptalene
Ok great.
I'll upload the new libraries :oops:

Re: Documentation

Posted: Tue Feb 17, 2015 3:06 am
by Naptalene
wow, there's a lot of stuff :shock:

Can you guys please advise on the following,
I wanted to start laying out individual dcpump Flow types and give a brief explanation of the number values.So I went into the Wizard, selected each pattern one at a time and saved that code so I could cut'npaste your legitimate code.

Here is one:

Code: Select all

void loop()

{

ReefAngel.DCPump.UseMemory = false;

ReefAngel.DCPump.SetMode( ShortPulse,50,10 ); // type, PumpSpeed in %, duration in milliseconds

ReefAngel.DCPump.DaylightChannel = Sync;

ReefAngel.DCPump.ActinicChannel = AntiSync;

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


}
Questions.....

1.)

If I go to this link

http://forum.reefangel.com/viewtopic.php?f=7&t=2844

You guys mention pulse minimum/maximum speeds etc. Am I correct that those values are part of the library for "ShortPulse" and if I just want pulses I don't need that stuff - it's already embedded when I call "Short Pulse"?
So for what is essentially my "Idiots guide" front section I'll skip those and give the basic functions.
We can create a dedicated section for that info at the end as a proper referance document (be it as a wiki or whatever)

2. If I go on my Apple App there are the following modes that I can't create code for via the Wizard:

Storm
Custom
Constant
Lagoon

I'd like to be able to format/give the descriptions for them. Can someone direct me to or supply a simple code as per the above layout for them please?

Re: Documentation

Posted: Tue Feb 17, 2015 8:50 am
by rimai
Correct. For ShortPulse mode, the minimum speed is always 0, defined inside the libraries.
The user should not need to worry about the minimum speed and simply use the settings according to what you placed in the comment above. So 50 would be the pump speed in % and 10 would be duration in milliseconds.
The wizard is capable of creating constant and lagoon. You may need to scroll up the pop-up options selection.
Storm is a mode I invented but it is not much used by anyone and Custom mode is for advanced users that want to have extreme control over the pumps.
The code for each of them is exactly the same for all modes. The only thing that changes is the mode.
This is the list of modes (case sensitive):
Constant
Lagoon
ReefCrest
ShortPulse
LongPulse
NutrientTransport
TidalSwell
Storm
Else
Sine
Gyre

So, you would change this:

Code: Select all

ReefAngel.DCPump.SetMode( ShortPulse,50,10 );
To this:

Code: Select all

ReefAngel.DCPump.SetMode( Constant,50,0 );
The above code would put the pumps in Constant mode at 50%. Duration is not used in Constant mode.

Re: Documentation

Posted: Tue Feb 17, 2015 10:51 am
by Naptalene
Ok cool, figured that but just wanted to make sure.

Re: Documentation

Posted: Thu Feb 19, 2015 4:59 am
by Naptalene
Hi, another clarifier please,

Code: Select all

void loop()

{

ReefAngel.PWM.SetDaylight( PWMSlope(9,0,20,0,15,100,60,15) ); //

ReefAngel.PWM.SetDaylight( PWMSlope(9,0,20,0,15,100,60,15) ); 

} 
Could you please give me the descriptions of the numbers, in order for both the shapes.
There are too many "0"s from what comes out of the wizard :P
Can you ommit those values happily?

Re: Documentation

Posted: Thu Feb 19, 2015 5:05 am
by cosmith71
Start hour, start minute, end hour, end minute, start percentage, end percentage, time of slope, default value.

So, 9,00 is 9 AM, 20,0 is 8 PM. 9,30 would be 9:30 AM. 21,45 would be 9:45 PM. You can't leave them out.

--Colin

Re: Documentation

Posted: Thu Feb 19, 2015 5:26 am
by Naptalene
Oh goodness, so the first 2 numbers there are hour/minutes...... that's embarrasing/funny.
I thought they were 2 seperate fields completely.
Thanks.

Re: Documentation

Posted: Thu Feb 19, 2015 7:54 am
by lnevo
Where are we updating this? I don't see anything new on the github wiki... Roberto, didn't we setup a different wiki on the forum at one point too?

Re: Documentation

Posted: Thu Feb 19, 2015 8:15 am
by binder
lnevo wrote:Where are we updating this? I don't see anything new on the github wiki... Roberto, didn't we setup a different wiki on the forum at one point too?
yeah i thought we had a separate wiki as well. i do not recall the location of it though.


Sent from my iPad mini

Re: Documentation

Posted: Thu Feb 19, 2015 8:23 am
by lnevo

Re: Documentation

Posted: Thu Feb 19, 2015 10:50 am
by Naptalene
To be honest I was too embarrassed to load stuff onto any of the official sites.
I just started a spreadsheet with every unit.
Now I'm using the Wizard to push out stock code for different things.
I got a lot of that sorted and started a wiki today just linking a whole load of stuff. I'm learning how to do that on the fly...
I just didn't want to
a) overwrite anything by mistake
B) let anything I'm doing be seen as "official"

I wanted to get it done and then let you guys decide what you think.
Then if you OK'd it figured we could move it accross.

http://reefangelcontrollerdocuments.wikia.com

Hope this place is okay for now and lots still to do.
I would need you guys to make sure my explanations are all correct etc.
And then I thought we could make a page with the breakdowns where I take the library info and put it in there?
I'd copy/paste as its way out of my depth?

Anyway, I've learnt tons already. Let me know if I must keep going?
I would just like it to be "unofficial" and away from the world ( he says as he starts a freaking wiki)before you guys are happy.

Cheers
Andrew

Re: Documentation

Posted: Thu Feb 19, 2015 11:13 am
by rimai
You can use the wiki above too. We have nothing in that wiki so far :(

Re: Documentation

Posted: Thu Feb 19, 2015 11:16 am
by cosmith71
I don't think I have access to edit on the RA wiki.

Re: Documentation

Posted: Thu Feb 19, 2015 11:24 am
by lnevo
Which one lol

Re: Documentation

Posted: Thu Feb 19, 2015 11:26 am
by cosmith71

Re: Documentation

Posted: Thu Feb 19, 2015 11:29 am
by rimai
Are you able to login using the same user/pass of the forum?

Re: Documentation

Posted: Thu Feb 19, 2015 11:31 am
by cosmith71
I don't see a place to login.

Re: Documentation

Posted: Thu Feb 19, 2015 11:32 am
by rimai
Top right corner

Re: Documentation

Posted: Thu Feb 19, 2015 12:09 pm
by Naptalene
Lol
I'll shunt it all over to there if it's empty.
You guys okay with the way I'm doing iron the link one?

Re: Documentation

Posted: Thu Feb 19, 2015 12:12 pm
by rimai
I like it :)

Re: Documentation

Posted: Thu Feb 19, 2015 11:54 pm
by Naptalene
Continuing with the "Village idiot" theme.......
The RA wiki doesnt have a WYSIWIG interface. It's going to take me ages to get into doing it that way.
I can obviously figure out how to do the headings etc, but links and all that fun stuff will be a bit of a pain. I'm doing this in-between sessions at our studios so I cant really learn it.

I'll carry on in this one
http://reefangelcontrollerdocuments.wik ... ments_Wiki

and get the actual info down and then we can get it over onto the RA site.

Current workflow is...... non-existant and I'm flying all over the place :)

Re: Documentation

Posted: Fri Feb 20, 2015 3:17 am
by Naptalene
Hi, please can you guys help with this:

IOExpander:

How do you call it? I got this by looking at the Library (be very afraid)

ReefAngel.IOPorts(0); // where IOPorts is the IOExpansion, 0 is the first Port

As an example, could you give me the following(I know its very basic):

Float switch on IOExpansion Channel 0
When it triggers Relay box port 1 turns off.

PowerControlExpander:
How do you call it?
As an example, could you give me the following(very basic again)

Floatswitch on ATO low.
When it triggers turn Power control port1 on.

I couldn't find that info easily.
Thanks in Advance