PWM Slope

Related to the development libraries, released by Curt Binder

Posts: 12225
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Dec 31, 2012 9:26 am
There is an overnight function available:
viewtopic.php?p=8905#p8905
Roberto.
User avatar
Posts: 5347
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon Dec 31, 2012 10:21 am
Cool. Good to know. On my other question... will an inverse slope work ? Where we dim to dark and dim back up?

Posts: 12225
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Dec 31, 2012 10:23 am
I think so....
Never tried.
Roberto.
User avatar
Posts: 5347
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon Dec 31, 2012 10:33 am
Guess I will give it a try and report back..
User avatar
Posts: 5347
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Tue Jan 01, 2013 3:00 pm
It did not seem to work. The portal shows no change between my darkness hours...no slope seen :(

Posts: 12225
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue Jan 01, 2013 4:48 pm
Did you use the overnight version?
Roberto.
User avatar
Posts: 5347
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Tue Jan 01, 2013 4:54 pm
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.
User avatar
Posts: 5347
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Tue Jan 01, 2013 6:36 pm
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());
    }

Posts: 12225
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue Jan 01, 2013 9:22 pm
Oh no...
You need to do the opposite...
You need to overnight function and ramp up at 5am and down at 2am
Roberto.
User avatar
Posts: 5347
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Tue Jan 01, 2013 9:26 pm
Ahhh got it. Will try tomorrow.
PreviousNext

Return to Development Libraries

Who is online

Users browsing this forum: No registered users and 2 guests

cron