Need coding help

Do you have a question on how to do something.
Ask in here.
Post Reply
tentacles
Posts: 20
Joined: Sun Oct 07, 2012 10:21 pm

Need coding help

Post by tentacles »

What I want to do is use the variable from the menu setting for PWM as the max value in the
ReefAngel.PWM.SetDaylight( PWMSlope(13,0,22,05,11,20,20,11) );
ReefAngel.PWM.SetActinic( PWMSlope(12,10,22,45,11,30,30,11) );
functions..

as in:
ReefAngel.PWM.SetDaylight( PWMSlope(13,0,22,05,11,menu_var1,menu_var1,11) );
ReefAngel.PWM.SetActinic( PWMSlope(12,10,22,45,11,menu_var2,menu_var2,11) );

Is this somehow possible? Thanks!
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Need coding help

Post by rimai »

It's easy to do with the wifi attachment. Do you have one?
Roberto.
tentacles
Posts: 20
Joined: Sun Oct 07, 2012 10:21 pm

Re: Need coding help

Post by tentacles »

Unfortunately, I don't.. Is there some other way?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Need coding help

Post by rimai »

We will need to come up with a work around, is it ok?
We can set the end of slope with the PWM menu and the duration with the wavemaker menu.
Would that work for you?
Roberto.
tentacles
Posts: 20
Joined: Sun Oct 07, 2012 10:21 pm

Re: Need coding help

Post by tentacles »

A work around would do just fine, and all I need to be able to change is the end of slope, I am upping the intensity by 1% a week and it's already getting old reprogramming it every week.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Need coding help

Post by rimai »

Oh, if you only need to change the end of slope, there is already something for that.
Add this to your setup():

Code: Select all

 ReefAngel.AddStandardMenu();
Then use this function:

Code: Select all

 ReefAngel.PWM.SetDaylight( PWMSlope(13,0,22,05,11,InternalMemory.LEDPWMDaylight_read(),20,11) );
 ReefAngel.PWM.SetActinic( PWMSlope(12,10,22,45,11,InternalMemory.LEDPWMActinic_read(),30,11) );
You should be able to change the LED PWM settings through the menu now.
Roberto.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Need coding help

Post by lnevo »

Or you could look at how I am doing coral acclimation schedules...
tentacles
Posts: 20
Joined: Sun Oct 07, 2012 10:21 pm

Re: Need coding help

Post by tentacles »

Thanks Roberto!

Inevo: Looking now!
Post Reply