Jebo WP25 coding/ Custom screens

Do you have a question on how to do something.
Ask in here.
Post Reply
Bruz4023
Posts: 33
Joined: Mon Oct 07, 2013 10:11 am

Jebo WP25 coding/ Custom screens

Post 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.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Jebo WP25 coding/ Custom screens

Post by rimai »

Can you sketch something up on how you would like it to behave?
I don't white understand.
Roberto.
Bruz4023
Posts: 33
Joined: Mon Oct 07, 2013 10:11 am

Re: Jebo WP25 coding/ Custom screens

Post 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?
Attachments
Pump2.pdf
This is pump 2
(92.29 KiB) Downloaded 232 times
Pump1.pdf
This is pump 1
(92.29 KiB) Downloaded 225 times
Book1.pdf
(95.88 KiB) Downloaded 196 times
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Jebo WP25 coding/ Custom screens

Post by rimai »

Roberto.
Bruz4023
Posts: 33
Joined: Mon Oct 07, 2013 10:11 am

Re: Jebo WP25 coding/ Custom screens

Post 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.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Jebo WP25 coding/ Custom screens

Post 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.
Roberto.
Bruz4023
Posts: 33
Joined: Mon Oct 07, 2013 10:11 am

Re: Jebo WP25 coding/ Custom screens

Post 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!
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Jebo WP25 coding/ Custom screens

Post by rimai »

No changes to screens yet.
What kind of changes are you thinking of?
Roberto.
Bruz4023
Posts: 33
Joined: Mon Oct 07, 2013 10:11 am

Re: Jebo WP25 coding/ Custom screens

Post 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.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Jebo WP25 coding/ Custom screens

Post 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.
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Jebo WP25 coding/ Custom screens

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

Re: Jebo WP25 coding/ Custom screens

Post by lnevo »

Awesome. Can you post the defaults so people can see them here for reference?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Jebo WP25 coding/ Custom screens

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

Re: Jebo WP25 coding/ Custom screens

Post by lnevo »

Is it just for ports? What about ATO switch and AP/DP? We've always seen lots of requests for that..
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Jebo WP25 coding/ Custom screens

Post by rimai »

Not yet :(
Roberto.
Bruz4023
Posts: 33
Joined: Mon Oct 07, 2013 10:11 am

Re: Jebo WP25 coding/ Custom screens

Post by Bruz4023 »

ok so we are getting closer I cant wait till we can really customize the new screens!
Bruz4023
Posts: 33
Joined: Mon Oct 07, 2013 10:11 am

Re: Jebo WP25 coding/ Custom screens

Post by Bruz4023 »

ok so we are getting closer I cant wait till we can really customize the new screens!
Bruz4023
Posts: 33
Joined: Mon Oct 07, 2013 10:11 am

Re: Jebo WP25 coding/ Custom screens

Post 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!
Bruz4023
Posts: 33
Joined: Mon Oct 07, 2013 10:11 am

Re: Jebo WP25 coding/ Custom screens

Post 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?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Jebo WP25 coding/ Custom screens

Post 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.
Roberto.
ReEfnWrX
Posts: 234
Joined: Tue Nov 05, 2013 8:40 am
Location: Houston TX

Re: Jebo WP25 coding/ Custom screens

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

Re: Jebo WP25 coding/ Custom screens

Post by lnevo »

You need to leverage custom mode...
ReEfnWrX
Posts: 234
Joined: Tue Nov 05, 2013 8:40 am
Location: Houston TX

Re: Jebo WP25 coding/ Custom screens

Post by ReEfnWrX »

But what if you use more than one custom wave pattern?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Jebo WP25 coding/ Custom screens

Post 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?
Post Reply