Page 1 of 1

Jebo WP25 coding/ Custom screens

Posted: Sat Nov 16, 2013 11:06 am
by Bruz4023
I have two wp25 and want to change the long pulse code. What I want to do is have the pump rev up not just turn on stay on for around 10 seconds and than either shut off or slow down. then i want a pause of a second or so and the other pump starts to rev up and stays on for 10 seconds and than shuts off or slows down.

I also want to have the pumps randomly change intensities and duration as if a storm is rolling though.


The other question is how to change the new screens? I love the new screens but some of the labels are wrong or unnecessary.

Re: Jebo WP25 coding/ Custom screens

Posted: Sat Nov 16, 2013 1:25 pm
by rimai
Can you sketch something up on how you would like it to behave?
I don't white understand.

Re: Jebo WP25 coding/ Custom screens

Posted: Sun Nov 17, 2013 5:02 pm
by Bruz4023
So this is a quick graph of what i want. they are anti sync and there is 1 second where both pumps are at 25% than the other revs up over 1 second time frame. it doesnt just turn on. does this help?

Re: Jebo WP25 coding/ Custom screens

Posted: Sun Nov 17, 2013 7:16 pm
by rimai

Re: Jebo WP25 coding/ Custom screens

Posted: Mon Nov 18, 2013 8:50 am
by Bruz4023
I currently am using that but it turns the pumps right on to 100% no 1 second rev. and there is no 1 second pause between pumps it immediately turns the second pump on. I want a second of quiet so the water can slow before the second pump begins to rev up.

I just dont know any of the key words to code the pumps. all i know how to do is the pre configured pump programs and they are not what i want! I have other plans for my tank that I will need to know how to control the pumps differently.

Re: Jebo WP25 coding/ Custom screens

Posted: Mon Nov 18, 2013 9:38 am
by rimai
Ahh..
You are going to have to create the waveform then.
There is no such waveform like that.
I think the best approach for you to learn is go little by little.
Use this:

Code: Select all

ReefAngel.PWM.SetDaylight(50);
This will give you 50% on the daylight channel.
The go to this:

Code: Select all

if (now()%6<3) 
ReefAngel.PWM.SetDaylight(0);
else
ReefAngel.PWM.SetDaylight(50);
This will cycle the daylight channel from 0 to 50% every 3 seconds.
Now, you need to come up with the mathematical formula that would recreate your waveform and code it following the same thought.

Re: Jebo WP25 coding/ Custom screens

Posted: Mon Nov 18, 2013 8:15 pm
by Bruz4023
Great that was what i was looking for! I didn't think of using the same code as the LED lights lol.

Now how about changing the new screens that you gave us? is someone creating a tutorial or anything? As I said I love the screens I just want to make little changes!

Re: Jebo WP25 coding/ Custom screens

Posted: Mon Nov 18, 2013 9:05 pm
by rimai
No changes to screens yet.
What kind of changes are you thinking of?

Re: Jebo WP25 coding/ Custom screens

Posted: Tue Nov 19, 2013 12:10 pm
by Bruz4023
well I want to change the names of the dimming expansion channels to things like royal blue, white, etc. the daylight and actinic channels to right pump or left pump. get rid or the extra temp slots add in cloud passing times. rather simple stuff. I would like graphs someday.

Re: Jebo WP25 coding/ Custom screens

Posted: Tue Nov 19, 2013 3:17 pm
by rimai
Well, we can change the labels right now, but not get rid of extra temp slots nor add passing times.
Let me look again on how I named the arrays for the labels.

Re: Jebo WP25 coding/ Custom screens

Posted: Tue Nov 19, 2013 11:58 pm
by rimai
Looking closely, I just added customizable labels for the ports :(
You can change them with:

Code: Select all

ReefAngel.CustomLabels[0]="MyLabel";
Anywhere after ReefAngel.Init();

Re: Jebo WP25 coding/ Custom screens

Posted: Wed Nov 20, 2013 12:53 am
by lnevo
Awesome. Can you post the defaults so people can see them here for reference?

Re: Jebo WP25 coding/ Custom screens

Posted: Wed Nov 20, 2013 9:37 am
by rimai
The array holds the labels for all ports in a sequence.
So, until we add some defines to the libraries, they will have to be referenced by number.
For the main relay box:

Code: Select all

ReefAngel.CustomLabels[0]="Port 1";
ReefAngel.CustomLabels[1]="Port 2";
ReefAngel.CustomLabels[2]="Port 3";
ReefAngel.CustomLabels[3]="Port 4";
ReefAngel.CustomLabels[4]="Port 5";
ReefAngel.CustomLabels[5]="Port 6";
ReefAngel.CustomLabels[6]="Port 7";
ReefAngel.CustomLabels[7]="Port 8";
For the expansion relay box 1:

Code: Select all

ReefAngel.CustomLabels[8]="Port 11";
ReefAngel.CustomLabels[9]="Port 12";
ReefAngel.CustomLabels[10]="Port 13";
ReefAngel.CustomLabels[11]="Port 14";
ReefAngel.CustomLabels[12]="Port 15";
ReefAngel.CustomLabels[13]="Port 16";
ReefAngel.CustomLabels[14]="Port 17";
ReefAngel.CustomLabels[15]="Port 18";
And it goes on until the last expansion box.

Re: Jebo WP25 coding/ Custom screens

Posted: Wed Nov 20, 2013 4:59 pm
by lnevo
Is it just for ports? What about ATO switch and AP/DP? We've always seen lots of requests for that..

Re: Jebo WP25 coding/ Custom screens

Posted: Wed Nov 20, 2013 5:48 pm
by rimai
Not yet :(

Re: Jebo WP25 coding/ Custom screens

Posted: Thu Nov 21, 2013 1:28 pm
by Bruz4023
ok so we are getting closer I cant wait till we can really customize the new screens!

Re: Jebo WP25 coding/ Custom screens

Posted: Thu Nov 21, 2013 2:15 pm
by Bruz4023
ok so we are getting closer I cant wait till we can really customize the new screens!

Re: Jebo WP25 coding/ Custom screens

Posted: Thu Nov 21, 2013 6:31 pm
by Bruz4023

Code: Select all

void MenuEntry1()
{
ReefAngel.FeedingModeStart();
}
void MenuEntry2()
{
ReefAngel.WaterChangeModeStart();
}
void MenuEntry3()
{
ReefAngel.ATOClear();
ReefAngel.DisplayMenuEntry("Clear ATO Timeout");
}
void MenuEntry4()
{
ReefAngel.OverheatClear();
ReefAngel.DisplayMenuEntry("Clear Overheat");
}
void MenuEntry5()
{
ReefAngel.SetupCalibratePH();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry6()
{
ReefAngel.SetupDateTime();

ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry7()
{
ReefAngel.DisplayVersion();
}

void MenuEntry8()
{

}

I have not altered my code yet so it is the stock dc pumps on, anti sync

ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( LongPulse,75,10 );
ReefAngel.DCPump.DaylightChannel = Sync;
ReefAngel.DCPump.ActinicChannel = AntiSync;

i want to be able to change the time either in the menu entry 8 setting or the app but I dont understand internal memory yet (is there a thread i can read on it?) so for the time being i would just change it on the controller. I was thinking that i would change the 10 to a char and have the time set by the reef controller but idk what the code would be to be able to change the char on the fly

in other words i want to be able to change the length the pumps are on, but i dont want to do it by changing the code on my computer!

Re: Jebo WP25 coding/ Custom screens

Posted: Thu Nov 21, 2013 6:50 pm
by Bruz4023
also can i make a menu within a menu? so menu 8 is called lighting and within it there is like turn on or off individual channels?
so i could turn on the RB the W and leave the pink off or just turn on the pink lights?

Re: Jebo WP25 coding/ Custom screens

Posted: Thu Nov 21, 2013 7:08 pm
by rimai
No nested menu :(
The best way of doing what you want is to use internal memory and change it through the portal.
Change this:

Code: Select all

 ReefAngel.DCPump.UseMemory = false;
 ReefAngel.DCPump.SetMode( LongPulse,75,10 );
To this:

Code: Select all

 ReefAngel.DCPump.UseMemory = true;
Then, go to the portal and change the settings.

Re: Jebo WP25 coding/ Custom screens

Posted: Tue Dec 24, 2013 9:06 pm
by ReEfnWrX
If we wanted to use the portal to change settings, but are also using custom wave patterns like the Else mode... What would we need to do? Add the wave pattern to the following files

globals.h
reefangel_1.5_lcd.h
globals.cpp
keywords.txt
reefangel.cpp

Or is there altering on the backend of the portal that would be required???

Re: Jebo WP25 coding/ Custom screens

Posted: Wed Dec 25, 2013 5:53 am
by lnevo
You need to leverage custom mode...

Re: Jebo WP25 coding/ Custom screens

Posted: Wed Dec 25, 2013 7:59 am
by ReEfnWrX
But what if you use more than one custom wave pattern?

Re: Jebo WP25 coding/ Custom screens

Posted: Wed Dec 25, 2013 8:17 am
by lnevo
Then you'll need another trigger to change it. You could use the built-in custom variables, a custom memory location or a random function..

Check Paulturner911's code or Sacohen.

What other custom waves are you using?