Page 1 of 1

Need coding help

Posted: Tue Jan 01, 2013 6:29 pm
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!

Re: Need coding help

Posted: Tue Jan 01, 2013 9:20 pm
by rimai
It's easy to do with the wifi attachment. Do you have one?

Re: Need coding help

Posted: Tue Jan 01, 2013 9:38 pm
by tentacles
Unfortunately, I don't.. Is there some other way?

Re: Need coding help

Posted: Wed Jan 02, 2013 9:21 am
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?

Re: Need coding help

Posted: Wed Jan 02, 2013 4:30 pm
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.

Re: Need coding help

Posted: Wed Jan 02, 2013 4:35 pm
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.

Need coding help

Posted: Wed Jan 02, 2013 4:52 pm
by lnevo
Or you could look at how I am doing coral acclimation schedules...

Re: Need coding help

Posted: Wed Jan 02, 2013 8:05 pm
by tentacles
Thanks Roberto!

Inevo: Looking now!