Documentation

Would you like to help?
Share your walkthrough tutorial with others
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.
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Documentation

Post by cosmith71 »

I don't think I have access to edit on the RA wiki.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Documentation

Post by lnevo »

Which one lol
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Documentation

Post by cosmith71 »

rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Documentation

Post by rimai »

Are you able to login using the same user/pass of the forum?
Roberto.
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Documentation

Post by cosmith71 »

I don't see a place to login.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Documentation

Post by rimai »

Top right corner
Roberto.
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

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

Re: Documentation

Post 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 :)
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, 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
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 »

And another,

Rope leak detector:

{

ReefAngel.LeakShutoffPorts = 0; // Turn off port if leaks are detected

}
I assume thats for the standard relay box.
If we use an expansion relay?

ReefAngel.LeakShutoffPorts = Box1_Port1;//
and on both?
ReefAngel.LeakShutoffPorts = 0,Box1_Port1;//
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 »

Roberto, I found the login button. Thanks. :D

How does one create a new page?

--Colin
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Documentation

Post by binder »

cosmith71 wrote:Roberto, I found the login button. Thanks. :D

How does one create a new page?

--Colin
you need to edit a page and create a link to the new page. then it will allow you to create the new page.


Sent from my iPad mini
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Documentation

Post by rimai »

I/O Expansion Module

It has 6 channels. Channel 0 through 5
We can check for status of each channel by using ReefAngel.IO.GetChannel( channel ), where channel is a value from 0 to 5.

Example

Let's check if the float switch connected to channel 3 of I/O Expansion module is floating and if it is, turn on port 1 of the relay box:

Code: Select all

if (ReefAngel.IO.GetChannel(3))
  ReefAngel.Relay.On( Port1);
else
  ReefAngel.Relay.Off( Port1);
Power Control Expansion Module
It has 8 ports. It works just like a relay expansion module. The ports are referenced the same way.
Relay and Power Control Expansion modules can be mix/matched and up to 8 can be connected to the system.
Each one needs its own ID, which can be set by changing the dip switch inside the module. The IDs can be set from 1 to 8.
Each port can be referenced using this ID. So, for example you want to reference port 3 of the box ID 1, you would use Box1_Port3.
To turn on/off a port, you can use ReefAngel.Relay.On( port ) and ReefAngel.Relay.Off( port ), where port is the name of the port depending on the ID you have set explained above.

Example

Let's check if the float switch connected to ATO Low port is floating (not active) and if it is, turn on port 3 of the Power Control Expansion module set to ID 1

Code: Select all

if (!ReefAngel.LowATO.IsActive())
  ReefAngel.Relay.On( Box1_Port3);
else
  ReefAngel.Relay.Off( Box1_Port3);
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Documentation

Post by rimai »

You can set each port, on the main relay box or on any expansion module to be turn on/off depending on which mode or special conditions.
We have 2 modes: feeding and water change and 3 special modes: lights on, overheat and leak detection.

Example

Let's turn port 1 and port 7 of the main relay box on feeding mode:

Code: Select all

    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port1Bit | Port7Bit;
Let's turn port 2 of the main relay box and port 5 of relay expansion box ID 1 on feeding mode:
Note: The ID is actually decremented by 1 when you reference them in this code.

Code: Select all

    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port2Bit;
    ReefAngel.FeedingModePortsE[0] = Port5Bit;
Other modes and special conditions you can set:

Code: Select all

    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    ReefAngel.WaterChangePortsE[0] = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    ReefAngel.LightsOnPortsE[0] = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;
    ReefAngel.OverheatShutoffPortsE[0] = 0;
    // Ports turned off when Leak is detected
    ReefAngel.LeakShutoffPorts = 0;
    ReefAngel.LeakShutoffPortsE[0] = 0;

Roberto.
jegillis
Posts: 86
Joined: Sat Jan 04, 2014 10:26 am

Re: Documentation

Post by jegillis »

You can also set a delay on ports turning on after feeding or water change

Code: Select all

ReefAngel.Relay.DelayedOn(Port7,1);
This is placed in the loop. (port,timeinminutes)


I use it to delay starting my in sump skimmer
Image
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Documentation

Post by Naptalene »

Thanks gents.

A big penny dropped with the power expander being addressed the same as a relay box.
I'll double check the layout wrt the modes, and I prefer having it all in your guys words.

WRT the delayed ports etc.
I was thinking of setting up a Wizard page.
In that page have list of those port modes etc. That you can choose for the relay boxes.
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 »

Work is getting the better of me. I'll get back onto it ASAP
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 »

Hello,

I got time again today. It's starting to flesh out but I think it still makes for easy navigation.

http://reefangelcontrollerdocuments.wik ... ments_Wiki

I havent added the last bit of code you supplied to me but hopefully I'll get that in tomorrow.

Cheers
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 »

Andrew, it would be great if there were a link of To Do items in the wiki. Could you create a list of topics that still need to be covered so someone who wants to contribute like myself can see where their efforts are best spent :)
Post Reply