Can an offset be used on a PWM channel?
Can an offset be used on a PWM channel?
I'm refering to the actinic offset for "standard lighting," can that be used for actinics that are on a PWM expansion? What about reverse cycle for a refugium?
Re: Can an offset be used on a PWM channel?
You can use the offset like this:
For refugium, the standard slope function can't cross the next day.
Try this:
http://forum.reefangel.com/viewtopic.ph ... 9&start=20
Code: Select all
ReefAngel.PWM.Channel0PWMSlope( InternalMemory.ActinicOffset_read() );
Try this:
http://forum.reefangel.com/viewtopic.ph ... 9&start=20
Roberto.
Re: Can an offset be used on a PWM channel?
Thanks Roberto, but I'm at a loss for how to incorporate that into here
Also, is it possible to have more than one offset? I'd like to have channel 2 come on first, folowed by channel 1 about 5 minutes later and then, channel 3, 5 or 10 minutes after that.
Code: Select all
ReefAngel.PWM.SetChannel( 2, PWMParabola(
InternalMemory.StdLightsOnHour_read(),
InternalMemory.StdLightsOnMinute_read(),
InternalMemory.StdLightsOffHour_read(),
InternalMemory.StdLightsOffMinute_read(),
InternalMemory.PWMSlopeStart3_read(),
InternalMemory.PWMSlopeEnd3_read(),
0));
Re: Can an offset be used on a PWM channel?
It's inside the RA_PWM.cpp file
That's where I got the one you are using, but here it is:
That's where I got the one you are using, but here it is:
Code: Select all
int MinuteOffset=InternalMemory.ActinicOffset_read();
int onTime=NumMins(InternalMemory.StdLightsOnHour_read(),InternalMemory.StdLightsOnMinute_read())-MinuteOffset;
int offTime=NumMins(InternalMemory.StdLightsOffHour_read(),InternalMemory.StdLightsOffMinute_read())+MinuteOffset;
ReefAngel.PWM.SetChannel( 2, PWMParabola(
onTime/60,
onTime%60,
offTime/60,
offTime%60,
InternalMemory.PWMSlopeStart3_read(),
InternalMemory.PWMSlopeEnd3_read(),
0));
Roberto.
Re: Can an offset be used on a PWM channel?
Thanks again! Clearly, I'm in over my head on this one, I'll have to put this on hold until I understand it better.