Documentation

Would you like to help?
Share your walkthrough tutorial with others
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Documentation

Post by lnevo »

I'm not sure what is expected for some of those headings.. but that's cause I'm not a normal user.

What are "links to Temp probes"

How do temp probes get classified under the relay unit?

I don't think there's any user-assigned port names for input ports..
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post by Naptalene »

A Link to the section on temp probes.... Not sure what else I can say?
You would've just had T1 in the example so link to that item so guys can learn.

I forgot that I re-labelled my input and output ports via the portal and not in the code.
My ATO high is "skimmer kill" and low is "power status" or vice versa, I can't recall.
So we get rid of that. I'm just trying to get a layout that you guys think could work.
Believe it or not.... I can ask even stupider questions than this one.
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post by Naptalene »

I just re-read your post.....

I think you see it as a "class and commands for that class" document and in my head I think of it as an almost linear read like an instruction manual.....

I'm really feeling like the village idiot talking to the wisemen right now.
Believe it or not.... I can ask even stupider questions than this one.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Documentation

Post by rimai »

Naptalene wrote:Hi, my name's Andrew and I'm Normal lol.

I think it's settled for both ideally.
What if we do this for structure:

RAplus

1. Std Relay unit

1.1 description
1.2 port names
1.3 defining user assigned port names
1.4 how to turn ports on or off
1.5 example using T1 as main probe with in depth comments
1.6 links to Temp probes

2. Input ports

1.1 description
1.2 port names
1.3 defining user assigned port names
1.4 how to read the status of the input
1.5 example using standard ATO code
1.6 commonly requested code
1.6 links to relay,

On temp probes we could link to PWM as well and show how you can change fan speed based on probe reading.

What do you think?
I like the structure :)
Roberto.
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post by Naptalene »

Coolest.

I'll try make a list like that for all the units/ expanders to start off with.

And as mentioned using the "how do I code" thread as a reference for commonly needed code is a great idea.
Do you guys have a clever way of figuring that out or shall I be DataCapturer 1st Class?
Believe it or not.... I can ask even stupider questions than this one.
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Documentation

Post by cosmith71 »

Naptalene wrote:I just re-read your post.....

I think you see it as a "class and commands for that class" document and in my head I think of it as an almost linear read like an instruction manual.....

I'm really feeling like the village idiot talking to the wisemen right now.
I understand what you mean. You want something that introduces a topic and then explains how it works, right?

--Colin
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post by Naptalene »

Yes!!! Thank you for putting it into English. I don't think it's just me who would appreciate it.
And perhaps we then have a final point for each topic which would link to a proper Referance list for the more serious coders, so it's all there for them/you guys.
Believe it or not.... I can ask even stupider questions than this one.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Documentation

Post by lnevo »

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.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Documentation

Post by lnevo »

I think screen labels are generic we should have a section for naming things and break out the different kinds of naming :)
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Documentation

Post by cosmith71 »

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
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post 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
Believe it or not.... I can ask even stupider questions than this one.
Jim_J
Posts: 13
Joined: Sat Jun 15, 2013 3:21 pm

Re: Documentation

Post 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 :)
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post 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
Believe it or not.... I can ask even stupider questions than this one.
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post 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.
Believe it or not.... I can ask even stupider questions than this one.
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Documentation

Post 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
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post 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.
Believe it or not.... I can ask even stupider questions than this one.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Documentation

Post 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.
Roberto.
Jim_J
Posts: 13
Joined: Sat Jun 15, 2013 3:21 pm

Re: Documentation

Post by Jim_J »

Looking good Naptalene! Thumbs up :)
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post by Naptalene »

Ok great.
I'll upload the new libraries :oops:
Believe it or not.... I can ask even stupider questions than this one.
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post 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?
Believe it or not.... I can ask even stupider questions than this one.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Documentation

Post 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.
Roberto.
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post by Naptalene »

Ok cool, figured that but just wanted to make sure.
Believe it or not.... I can ask even stupider questions than this one.
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post 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?
Believe it or not.... I can ask even stupider questions than this one.
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Documentation

Post 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
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post 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.
Believe it or not.... I can ask even stupider questions than this one.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Documentation

Post 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?
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Documentation

Post 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
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post 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
Believe it or not.... I can ask even stupider questions than this one.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Documentation

Post by rimai »

You can use the wiki above too. We have nothing in that wiki so far :(
Roberto.
Post Reply