wavemaker random option

Post Reply
Reefology
Posts: 209
Joined: Fri Dec 26, 2014 6:38 pm

wavemaker random option

Post by Reefology »

Hi,

when i originally set up/tested the wizard, random option in wavemaker was available but just now the wizard won't allow me to select it?! Can someone explain why and help me fix it?

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

Re: wavemaker random option

Post by rimai »

You can use that on port 5 and 6

Sent from my Galaxy S5 with Tapatalk
Roberto.
Ademster
Posts: 144
Joined: Tue Aug 14, 2012 1:11 pm

Re: wavemaker random option

Post by Ademster »

reefology is right, the option is no longer available to use on the wizard.
Adam
58 Gal
Image
Reefology
Posts: 209
Joined: Fri Dec 26, 2014 6:38 pm

Re: wavemaker random option

Post by Reefology »

it's there but i can't select it :(
Image
Reefology
Posts: 209
Joined: Fri Dec 26, 2014 6:38 pm

Re: wavemaker random option

Post by Reefology »

ok, if i go back in wizard and i select "in the code" in memory settings, it allows me to select the random option. If I select "in the internal memory" i can only select constant and all wavemaker ports have to be on at the same time. I presume it would require custom code which is not something I really want to take on at this point.
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: wavemaker random option

Post by cosmith71 »

You can run the wizard and have it generate the code you want and cut and paste into your core code.

I ran the wizard with no options except the wavemakers (in the code). It gave me this:

Code: Select all

#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <PAR.h>
#include <ReefAngel.h>

////// Place global variable code below here


////// Place global variable code above here


void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    ReefAngel.AddStandardMenu();  // Add Standard Menu

    ReefAngel.Use2014Screen();  // Let's use 2014 Screen 
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 869 );


    // Ports that are always on

    ////// Place additional initialization code below here
    

    ////// Place additional initialization code above here
}

void loop()
{
    ReefAngel.WavemakerRandom( Port5,60,100 );
    ReefAngel.WavemakerRandom( Port6,60,100 );
    ////// Place your custom code below here
    

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.ShowInterface();
}

These two lines are what you want:

Code: Select all

 ReefAngel.WavemakerRandom( Port5,60,100 );
    ReefAngel.WavemakerRandom( Port6,60,100 );
Just copy and paste these two lines into your loop() and you have random wavemakers.

The 60 and 100 are the lower and upper limits of the random times. Change them to whatever you want.

Voila. You have your first custom code.

--Colin
Reefology
Posts: 209
Joined: Fri Dec 26, 2014 6:38 pm

Re: wavemaker random option

Post by Reefology »

Thanks Colin, copied and pasted!

So in the future if I update some parameters in the internal memory (say my lighting schedule), in either the portal or the iphone app, does this also effect the wavemaker? With this code I don't get the random option to adjust in the internal memory.
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: wavemaker random option

Post by cosmith71 »

Nope. The wavemakers are under control of the above code. I don't think there are memory locations for the random function and that is why it must be hard coded.

When you update memory values for one thing, that's the only thing affected.

In fact, if you have something hard coded (like a lighting schedule) you can change the memory values all day and it won't make any difference. :D

--Colin
Reefology
Posts: 209
Joined: Fri Dec 26, 2014 6:38 pm

Re: wavemaker random option

Post by Reefology »

well i tested it and i get a wavemaker error message under the internal memory in the portal, and as a result, port 6 has been inactive throughout the night.

I'm guessing when it comes to the internal memory, its all or nothing (seeing there's a single save button for all parameters)? it would be cool if you could save each function independently.

Thanks Colin...I'm saying that a lot recently :)
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: wavemaker random option

Post by cosmith71 »

Are you using the above code? Internal memory will not affect it, since it's hard coded.

--Colin
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: wavemaker random option

Post by cosmith71 »

Oh, and you're welcome. I've had 5 days off and I've had a lot of computer time. :D

--Colin
Reefology
Posts: 209
Joined: Fri Dec 26, 2014 6:38 pm

Re: wavemaker random option

Post by Reefology »

basically yes
Image
Reefology
Posts: 209
Joined: Fri Dec 26, 2014 6:38 pm

Re: wavemaker random option

Post by Reefology »

lol, I've had a lot of computer time as well over the holidays...trying to squeeze a little more in before i head out to work :D
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: wavemaker random option

Post by lnevo »

Nothinng in your code so long as port forwarding is set right should give you an error from the portal. If you had all hard coded you could still use the portal to preset all the memory locations. Can you screenshot the error?
Reefology
Posts: 209
Joined: Fri Dec 26, 2014 6:38 pm

Re: wavemaker random option

Post by Reefology »

now i got this error msg trying to upload the screenshot.

Screenshot from 2015-01-05 17:19:22.png is an invalid filename.
Image
Reefology
Posts: 209
Joined: Fri Dec 26, 2014 6:38 pm

Re: wavemaker random option

Post by Reefology »

did this work?
Attachments
reefangel.png
reefangel.png (285 KiB) Viewed 6740 times
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: wavemaker random option

Post by lnevo »

Ok so your port forwarding is good but I think your confused about wavemaker and dcpump. Not sure why you got that error, but Wavemaker means you are using relay port 5 and 6 with simple on/off powerheads. The DCPump is used to control Jaebo style controllable pumps. So which are you using? If you have the jaebo pumps they don't have to use up a port on your relay bar and you don't want to be doing the wavemaker functions with them.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: wavemaker random option

Post by lnevo »

And now that your banner is working i can see you have one jaebo and one koralia.

Could you start a thread and post your current code that your using? We can keep all the questions related to your setup in one place :)
Reefology
Posts: 209
Joined: Fri Dec 26, 2014 6:38 pm

Re: wavemaker random option

Post by Reefology »

Absolutely...will do.
Image
Post Reply