Community contributed apps
binder
Posts: 2865 Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:
Post
by binder » Sun Apr 29, 2012 7:40 am
The 2 slope functions that are added (ActinicPWMSlope and DaylightPWMSlope) use these memory values:
Code: Select all
InternalMemory.PWMSlopeStartD_write(10);
InternalMemory.PWMSlopeEndD_write(95);
InternalMemory.PWMSlopeDurationD_write(60);
InternalMemory.PWMSlopeStartA_write(20);
InternalMemory.PWMSlopeEndA_write(100);
InternalMemory.PWMSlopeDurationA_write(60);
and they also use the same light schedule (on & off times) as the StandardLights schedule.
So no changes are necessary to the functions.
abhi_123
Posts: 216 Joined: Tue Mar 20, 2012 8:34 am
Post
by abhi_123 » Sun Apr 29, 2012 7:54 am
Thanks Curt. Btw if i plan to use parabola what changes if i have to make in my current code?
binder
Posts: 2865 Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:
Post
by binder » Sun Apr 29, 2012 7:57 am
abhi_123 wrote: Thanks Curt. Btw if i plan to use parabola what changes if i have to make in my current code?
The changes are simple. You would change this:
Code: Select all
ReefAngel.PWM.ActinicPWMSlope();
ReefAngel.PWM.DaylightPWMSlope();to this:
Code: Select all
ReefAngel.PWM.ActinicPWMParabola();
ReefAngel.PWM.DaylightPWMParabola();
Then reload your code on your controller. That's all that would be needed.
abhi_123
Posts: 216 Joined: Tue Mar 20, 2012 8:34 am
Post
by abhi_123 » Sun Apr 29, 2012 8:03 am
cool. Thats very simple.
one more thing(sorry for troubling you with my newbie question) i will be using pwm fans to control the temp of my heatsink & tank i want to put a conditional code like if the temp of t1 increased the desired value start the fan which is installed on channel 4 in pwm expansion module & gradually decrease its speed depending upon the temp.
TanksNStuff
Posts: 188 Joined: Fri Dec 30, 2011 6:57 am
Post
by TanksNStuff » Sat Oct 06, 2012 6:23 pm
binder wrote: abhi_123 wrote: Thanks Curt. Btw if i plan to use parabola what changes if i have to make in my current code?
The changes are simple. You would change this:
Code: Select all
ReefAngel.PWM.ActinicPWMSlope();
ReefAngel.PWM.DaylightPWMSlope();to this:
Code: Select all
ReefAngel.PWM.ActinicPWMParabola();
ReefAngel.PWM.DaylightPWMParabola();
Then reload your code on your controller. That's all that would be needed.
Sorry to bring up old topics, but I had a question about the code above and the 1.2.2 libraries.
How would I do this for the PWM Expansion Module channels?
My currently working code (using slope) is as follows:
Code: Select all
ReefAngel.PWM.Channel0PWMSlope(InternalMemory.ActinicOffset_read());
ReefAngel.PWM.Channel1PWMSlope(InternalMemory.ActinicOffset_read());
ReefAngel.PWM.Channel2PWMSlope();
ReefAngel.PWM.Channel3PWMSlope();
I'd like to change it from Slope to Parabola. What's the proper syntax please?
rimai
Posts: 12857 Joined: Fri Mar 18, 2011 6:47 pm
Post
by rimai » Sat Oct 06, 2012 8:03 pm
Code: Select all
ReefAngel.PWM.Channel0PWMParabola(InternalMemory.ActinicOffset_read());
ReefAngel.PWM.Channel1PWMParabola(InternalMemory.ActinicOffset_read());
ReefAngel.PWM.Channel2PWMParabola();
ReefAngel.PWM.Channel3PWMParabola();
Roberto.
TanksNStuff
Posts: 188 Joined: Fri Dec 30, 2011 6:57 am
Post
by TanksNStuff » Sat Oct 06, 2012 8:27 pm
Thanks Roberto. That's what I thought it was, but just wanted to be sure.