PWM Slope
Re: PWM Slope
There is an overnight function available:
http://forum.reefangel.com/viewtopic.php?p=8905#p8905
http://forum.reefangel.com/viewtopic.php?p=8905#p8905
Roberto.
Re: PWM Slope
Cool. Good to know. On my other question... will an inverse slope work ? Where we dim to dark and dim back up?
PWM Slope
It did not seem to work. The portal shows no change between my darkness hours...no slope seen
PWM Slope
Didnt need the overnight..i'll paste my code later tonight. The overnight was to support people doing a ramp up separate from ramp down.
Re: PWM Slope
Here's the block of code I tested last night. From the portal data, it seems to have dropped to 0 from 2am-5am.
Code: Select all
if ((hour()>=2) && (hour()<5)) { // 2:00am-4:59am
// Some complete darkness. Ramp down to 0 and back up to MoonPhase().
ReefAngel.PWM.SetDaylight(PWMSlope(2,0,5,0,MoonPhase(),0,30,0));
ReefAngel.PWM.SetActinic(PWMSlope(2,0,5,0,MoonPhase(),0,30,0));
} else {
// Set moonlights to the MoonPhase
ReefAngel.PWM.SetDaylight(MoonPhase());
ReefAngel.PWM.SetActinic(MoonPhase());
}
Re: PWM Slope
Oh no...
You need to do the opposite...
You need to overnight function and ramp up at 5am and down at 2am
You need to do the opposite...
You need to overnight function and ramp up at 5am and down at 2am
Roberto.
PWM Slope
I noticed the overnight function is not in the libraries?
Also, i noticed a function ReversePWM that was used in the cloud program...would that be more direct to use for what I am trying to do?
Also, i noticed a function ReversePWM that was used in the cloud program...would that be more direct to use for what I am trying to do?
Re: PWM Slope
Correct, the overnight never made to the libraries.
The reverse version is on seconds and not minutes, but it will also not cross over to next day.
The reverse version is on seconds and not minutes, but it will also not cross over to next day.
Roberto.