A Few more Questions

Related to the development libraries, released by Curt Binder
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

A Few more Questions

Post by cain »

1. With regards to feeding mode, it says it stops all pumps, can it be program to stop the return pump only?

2. with regards to sockets 1-8, will i have the ability to turn it on/off anytime i want?

that's it for now, i know i'll have a couple more once i get my RA in a week.

TIA.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: A Few more Questions

Post by rimai »

1. With RAGen is very easy to do that:
http://forum.reefangel.com/viewtopic.php?f=15&t=60

2. You can program them to whatever function you want. With RAGen, you can get it to behave like you want.
Roberto.
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

OK, thanks Roberto.
made the order today.

i can't wait!!!
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

I finally got RaGen to run,
i generate initial memory, changed some values and uploaded to to the controller, now the controller is stuck on the black and white screen with the values i inputted.
how do i get back to the original RA screen with the temp/time/ph/date display?
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: A Few more Questions

Post by binder »

cain wrote:I finally got RaGen to run,
i generate initial memory, changed some values and uploaded to to the controller, now the controller is stuck on the black and white screen with the values i inputted.
how do i get back to the original RA screen with the temp/time/ph/date display?
That's the InternalMemory setting PDE you have uploaded. To get back to the main one, just generate your file from the PDE tab inside RAGen. Then upload that file. It will work then.

curt
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

binder wrote:
cain wrote:I finally got RaGen to run,
i generate initial memory, changed some values and uploaded to to the controller, now the controller is stuck on the black and white screen with the values i inputted.
how do i get back to the original RA screen with the temp/time/ph/date display?
That's the InternalMemory setting PDE you have uploaded. To get back to the main one, just generate your file from the PDE tab inside RAGen. Then upload that file. It will work then.

curt
how do i do that?
go to RAgen, go to PDE, click generate and then upload the code generated?


EDIT: I Got it Curt, TY
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

Curt,
can you help me with the wavemaker code, the one where the wavemaker goes in random and wavemaker 2 tunrs off everytime wavemaker 1 turns on and vice versa?
how do i make the code for that?
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

when i put the following temperature values:
heater on: 80.9F
heater off: 82.2F
port 7: heater

this means, port 7 will turn on when temperature goes down to 80.9F and when temperature goes up to 82.2, the port 7 will turn off?

i'm beginning to get a grasp.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: A Few more Questions

Post by rimai »

You got it :)
Roberto.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: A Few more Questions

Post by binder »

cain wrote:Curt,
can you help me with the wavemaker code, the one where the wavemaker goes in random and wavemaker 2 tunrs off everytime wavemaker 1 turns on and vice versa?
how do i make the code for that?
Check out this thread for that (the one that you asked about this in):

http://forum.reefangel.com/viewtopic.ph ... ggle#p1682

Now, when you use this, you will not use the Wavemaker1 and Wavemaker2 functions. You will also need to adapt the Ports as needed to be the proper ports. You will also want to merge the above code into your PDE file. If you are confused or having problems, I would suggest posting your PDE file to the thread above and then we can adapt/merge it together to get the code working properly for you.

curt
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

here's my PDE code:
------------------------------------------------------------------------------------------------------------
// Autogenerated file by RAGen (v1.0.4.92), (08/26/2011 22:14)
// RA_082611_2214.pde
//
// This version designed for v0.8.5 Beta 12 or later

/* The following features are enabled for this PDE File:
#define DisplayImages
#define WavemakerSetup
#define DateTimeSetup
#define VersionMenu
#define ATOSetup
#define MetalHalideSetup
#define DirectTempSensor
#define DisplayLEDPWM
#define StandardLightSetup
*/


#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>


void setup()
{
ReefAngel.Init(); //Initialize controller

// Ports that are always on
ReefAngel.Relay.On(Port8);
}

void loop()
{
ReefAngel.ShowInterface();

// Specific functions
ReefAngel.StandardATO(Port1);
ReefAngel.StandardLights(Port2);
ReefAngel.MHLights(Port3);
ReefAngel.Wavemaker1(Port4);
ReefAngel.Wavemaker2(Port5);
ReefAngel.StandardFan(Port6);
ReefAngel.StandardHeater(Port7);
}
--------------------------------------------------------------
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

how's this?
from the void set up to the top, it's the same right?
we're only changing the set up.
-------------------------------------------------------------------
void setup()
{
ReefAngel.Init(); //Initialize controller

// Ports that are always on
ReefAngel.Relay.On(Port8);
}
{
randomSeed(analogRead(0));
ReefAngel.Init();

ReefAngel.Timer[1].SetInterval(random(InternalMemory.WM1Timer_read()));
ReefAngel.Timer[1].Start();
ReefAngel.Relay.On(Port4);
}

void loop()
{
ReefAngel.ShowInterface();

if ( ReefAngel.Timer[1].IsTriggered() )
{
ReefAngel.Timer[1].SetInterval(random(InternalMemory.WM1Timer_read()));
ReefAngel.Timer[1].Start();
ReefAngel.Relay.Toggle(Port4);
}
}

{
randomSeed(analogRead(0));
ReefAngel.Init();

ReefAngel.Timer[1].SetInterval(random(InternalMemory.WM1Timer_read()));
ReefAngel.Timer[1].Start();
ReefAngel.Relay.On(Port4);
}

void loop()
{
ReefAngel.ShowInterface();

if ( ReefAngel.Timer[1].IsTriggered() )
{
ReefAngel.Timer[1].SetInterval(random(InternalMemory.WM1Timer_read()));
ReefAngel.Timer[1].Start();
ReefAngel.Relay.Toggle(Port4);
ReefAngel.Relay.Toggle(Port5); // added this line
}
}


void loop()
{
ReefAngel.ShowInterface();

// Specific functions
ReefAngel.StandardATO(Port1);
ReefAngel.StandardLights(Port2);
ReefAngel.MHLights(Port3);
ReefAngel.Wavemaker1(Port4);
ReefAngel.Wavemaker2(Port5);
ReefAngel.StandardFan(Port6);
ReefAngel.StandardHeater(Port7);
}
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: A Few more Questions

Post by binder »

Not quite. You can't have multiple setup() and loop() 's. It just won't work. So, what you need to do is combine them and update appropriately. Here's what it should be for you:

Code: Select all

// Autogenerated file by RAGen (v1.0.4.92), (08/26/2011 22:14)
// RA_082611_2214.pde
//
// This version designed for v0.8.5 Beta 12 or later

/* The following features are enabled for this PDE File: 
#define DisplayImages
#define WavemakerSetup
#define DateTimeSetup
#define VersionMenu
#define ATOSetup
#define MetalHalideSetup
#define DirectTempSensor
#define DisplayLEDPWM
#define StandardLightSetup
*/


#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>

void setup()
{
	randomSeed(analogRead(0));
	ReefAngel.Init(); //Initialize controller

	// Ports that are always on
	ReefAngel.Relay.On(Port8);
        // Random value from 60seconds to whatever is stored in internal memory
	ReefAngel.Timer[1].SetInterval(random(60, InternalMemory.WM1Timer_read()));
	ReefAngel.Timer[1].Start();
	ReefAngel.Relay.On(Port4);
}

void loop()
{
	ReefAngel.ShowInterface();

	// Specific functions
	ReefAngel.StandardATO(Port1);
	ReefAngel.StandardLights(Port2);
	ReefAngel.MHLights(Port3);
	if ( ReefAngel.Timer[1].IsTriggered() )
	{
                // Random value from 60seconds to whatever is stored in internal memory
		ReefAngel.Timer[1].SetInterval(random(60, InternalMemory.WM1Timer_read()));
		ReefAngel.Timer[1].Start();
		ReefAngel.Relay.Toggle(Port4);
		ReefAngel.Relay.Toggle(Port5);
	}
	ReefAngel.StandardFan(Port6);
	ReefAngel.StandardHeater(Port7);
}
Replace your current PDE (or create a new one) with what's above. Give that a shot. I think you will be happy with it.

Edit: Updated PDE code to have a minimum value of 60. So the random number will be from 60 to whatever is stored in InternalMemory. This will prevent a value of 0 from being used so the wavemaker will shutoff/toggle at somepoint. Without this min value, if a 0 is read then the wavemaker will never shutoff.

curt
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

Tried it, and worked like a charm. TY.

Now to the next.

i plugged in my head unit to the ph probe and the temp sensor.
ph probe displayed properly but temperature values didnt display in the head unit.
values are all zero (0) i tried all 3 ports for the temp and nothing seems to display the value.

i also have a question with regards to ATO,
if i'm going to use the "single ATO low' this means that, if the flaot switch falls down, the ATO port turns on to activate the pump, and when the float switch rises it turns off the pump.

how does "dual ATO" works?
bmhair03
Posts: 159
Joined: Sun Mar 20, 2011 1:22 pm

Re: A Few more Questions

Post by bmhair03 »

Power cycle the controller . Unplug it .Plug back in, temp sensor shoould read.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: A Few more Questions

Post by binder »

cain wrote: i also have a question with regards to ATO,
if i'm going to use the "single ATO low' this means that, if the flaot switch falls down, the ATO port turns on to activate the pump, and when the float switch rises it turns off the pump.

how does "dual ATO" works?
Read this: http://forum.reefangel.com/viewtopic.php?f=7&t=240

I just compiled it from other discussions to have a common document for it.

curt
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

got it, thanks.

about RaGen "ports toggled during modes"
if there's a check on the port does it mean it turns on or off?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: A Few more Questions

Post by rimai »

It turns off when you select the mode
Roberto.
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

on "OVERHEAT" option under "ports toggled during modes", which is suppose to be checked?
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: A Few more Questions

Post by binder »

cain wrote:on "OVERHEAT" option under "ports toggled during modes", which is suppose to be checked?
The "default" is to turn off only Port3 if the overheat temp is reached (port3 checked). That is because the metal halides are "defaulted" to port3. You can change it to whatever port you want or you can uncheck all the boxes so no ports get turned off.

curt
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

TY all, now lemme find something to mess up. lol
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

Curt,
is there a way to limit the number of secs/mins the wavemaker 1 to run?
i have observed (2 days now) that sometimes one port would run for hours before the other turns on.
i'm using this code where they alternate and random # of secs/mins:

void setup()
{
randomSeed(analogRead(0));
ReefAngel.Init(); //Initialize controller

// Ports that are always on
ReefAngel.Relay.On(Port8);
ReefAngel.Timer[1].SetInterval(random(InternalMemory.WM1Timer_read()));
ReefAngel.Timer[1].Start();
ReefAngel.Relay.On(Port4);
}

void loop()
{
ReefAngel.ShowInterface();

// Specific functions
ReefAngel.StandardATO(Port1);
ReefAngel.StandardLights(Port2);
ReefAngel.MHLights(Port3);
if ( ReefAngel.Timer[1].IsTriggered() )
{
ReefAngel.Timer[1].SetInterval(random(InternalMemory.WM1Timer_read()));
ReefAngel.Timer[1].Start();
ReefAngel.Relay.Toggle(Port4);
ReefAngel.Relay.Toggle(Port5);
}
ReefAngel.StandardFan(Port6);
ReefAngel.StandardHeater(Port7);
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: A Few more Questions

Post by rimai »

You need to change the wavemaker 1 timer.
The number set will be the maximum number of seconds.
You can use any of these options:
1. the joystick if you have the feature enabled.
2. Client 2.2 app
3. http://forum.reefangel.com/viewtopic.php?f=8&t=246
Roberto.
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

rimai wrote:You need to change the wavemaker 1 timer.
The number set will be the maximum number of seconds.
You can use any of these options:
1. the joystick if you have the feature enabled.
2. Client 2.2 app
3. http://forum.reefangel.com/viewtopic.php?f=8&t=246
wavemaker 1 = 240s
wavemaker 2 = 330 s

however, Curt said that if i use the code, it negates the wavemaker function.
that's why 1 wavemaker port runs for hours before it turns off and turns the otehr one on.
binder wrote:
cain wrote:Curt,
can you help me with the wavemaker code, the one where the wavemaker goes in random and wavemaker 2 tunrs off everytime wavemaker 1 turns on and vice versa?
how do i make the code for that?
Check out this thread for that (the one that you asked about this in):

http://forum.reefangel.com/viewtopic.ph ... ggle#p1682

Now, when you use this, you will not use the Wavemaker1 and Wavemaker2 functions. You will also need to adapt the Ports as needed to be the proper ports. You will also want to merge the above code into your PDE file. If you are confused or having problems, I would suggest posting your PDE file to the thread above and then we can adapt/merge it together to get the code working properly for you.

curt
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: A Few more Questions

Post by binder »

True, it doesn't use the wavemaker function but it does use the value stored for wavemaker 1.

This line:

ReefAngel.Timer[1].SetInterval(random(InternalMemory.WM1Timer_read()));

Should pick a random number between 0 and whatever value you have for WM1Timer. Based on what you said, it should be between 0 and 239. Not sure why it's running for hours unless something else is going on with it.

May have to test that some more to see what's going on with it.

curt
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

binder wrote:
May have to test that some more to see what's going on with it.

curt
thanks.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: A Few more Questions

Post by rimai »

You said maximum of 15min, correct?
15min = 900sec
Try this:

Code: Select all

void setup()
{
randomSeed(analogRead(0));
ReefAngel.Init(); //Initialize controller

// Ports that are always on
ReefAngel.Relay.On(Port8);
ReefAngel.Timer[1].SetInterval(random(1500));
ReefAngel.Timer[1].Start();
ReefAngel.Relay.On(Port4);
}

void loop()
{
ReefAngel.ShowInterface();

// Specific functions
ReefAngel.StandardATO(Port1);
ReefAngel.StandardLights(Port2);
ReefAngel.MHLights(Port3);
if ( ReefAngel.Timer[1].IsTriggered() )
{
ReefAngel.Timer[1].SetInterval(random(1500));
ReefAngel.Timer[1].Start();
ReefAngel.Relay.Toggle(Port4);
ReefAngel.Relay.Toggle(Port5);
}
ReefAngel.StandardFan(Port6);
ReefAngel.StandardHeater(Port7);
}
Roberto.
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

o.k. will try it.

1500 <- is that 1500 secs or 15mins?

EDIT:
uploaded

lemme observe it for a day. I'll get back tomorrow.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: A Few more Questions

Post by rimai »

I'm so sorry... :(
You are spot on.
Should be:

Code: Select all

ReefAngel.Timer[1].SetInterval(random(900));
Roberto.
cain
Posts: 81
Joined: Tue Aug 02, 2011 10:59 am

Re: A Few more Questions

Post by cain »

run the code you gave me Roberto, however, it still will stuck at relay 5 and wouldnt toggle to relay 4.
The solution is to power cycle the controller and then it will go on random again, i have adjusted the time from 1500 to 300 so i can observe it in a short period of time. i dont know why it will get stuck at relay 5 when it's been on for awhile.
Post Reply