Moonlights
Posted: Mon Apr 01, 2013 11:59 am
by ecam
Guys im running this code for my AI Sols. the moonlights are stuck at 48% throughout the day. How can i run these lights as true moonlights. Ideally I would like to let the lights to their thing and when its time for moonlughts at 10pm... i would like the blue to go to 2% and the Royal blue to go to 1%
ReefAngel.Relay.Set( Port2, !ReefAngel.Relay.Status( Port5 ) );
ReefAngel.StandardLights( Port3,11,0,15,0 );
ReefAngel.StandardLights( Port4,11,0,20,0 );
ReefAngel.StandardLights( Port5,9,0,19,0 );
ReefAngel.StandardHeater( Port7,780,800 );
ReefAngel.Relay.DelayedOn( Port8,2 ); //Skimmer
ReefAngel.AI.SetChannel( White, PWMParabola(11,0,17,0,0,60,0) );
ReefAngel.AI.SetChannel( Blue, PWMParabola(9,0,20,0,15,100,15) );
ReefAngel.AI.SetChannel( RoyalBlue, MoonPhase() );
ReefAngel.RF.UseMemory = false;
ReefAngel.RF.SetMode( ReefCrest,85,10 );
ReefAngel.RF.SetChannel( Radion_White, PWMParabola(9,0,20,0,0,60,0) );
ReefAngel.RF.SetChannel( Radion_RoyalBlue, MoonPhase() );
ReefAngel.RF.SetChannel( Radion_Red, PWMParabola(9,0,20,0,15,65,15) );
ReefAngel.RF.SetChannel( Radion_Green, PWMParabola(9,0,20,0,15,50,15) );
ReefAngel.RF.SetChannel( Radion_Blue, MoonPhase() );
ReefAngel.RF.SetChannel( Radion_Intensity, PWMParabola(9,0,20,0,15,94,15) );
Re: Moonlights
Posted: Mon Apr 01, 2013 5:06 pm
by rimai
The MoonPhase() function actually outputs the actual % of the moon for the day.
That's why it is 48%. It changes everyday and adjusts to the % of the full moon.
What you are asking is just static blue light that will always be the same.
Change this:
Code: Select all
ReefAngel.AI.SetChannel( White, PWMParabola(11,0,17,0,0,60,0) );
ReefAngel.AI.SetChannel( Blue, PWMParabola(9,0,20,0,15,100,15) );
ReefAngel.AI.SetChannel( RoyalBlue, MoonPhase() );
To this:
Code: Select all
ReefAngel.AI.SetChannel( White, PWMParabola(11,0,17,0,0,60,0) );
ReefAngel.AI.SetChannel( Blue, PWMParabola(9,0,20,0,15,100,1) );
ReefAngel.AI.SetChannel( RoyalBlue, PWMParabola(9,0,20,0,15,100,2) );
The last number is the parabola function is what you want to have after the light photo-period.
Re: Moonlights
Posted: Mon Apr 01, 2013 5:30 pm
by ecam
Roberto, is there anyway to put a constraint formula into the moonphase function? Cause 48% is too bright
rimai wrote:The MoonPhase() function actually outputs the actual % of the moon for the day.
That's why it is 48%. It changes everyday and adjusts to the % of the full moon.
What you are asking is just static blue light that will always be the same.
Change this:
Code: Select all
ReefAngel.AI.SetChannel( White, PWMParabola(11,0,17,0,0,60,0) );
ReefAngel.AI.SetChannel( Blue, PWMParabola(9,0,20,0,15,100,15) );
ReefAngel.AI.SetChannel( RoyalBlue, MoonPhase() );
To this:
Code: Select all
ReefAngel.AI.SetChannel( White, PWMParabola(11,0,17,0,0,60,0) );
ReefAngel.AI.SetChannel( Blue, PWMParabola(9,0,20,0,15,100,1) );
ReefAngel.AI.SetChannel( RoyalBlue, PWMParabola(9,0,20,0,15,100,2) );
The last number is the parabola function is what you want to have after the light photo-period.
Re: Moonlights
Posted: Mon Apr 01, 2013 8:37 pm
by rimai
Yeah, simply divide by whatever...
Let's say divide by 20 and you will get 0-5%.
Try this:
Code: Select all
ReefAngel.AI.SetChannel( White, PWMParabola(11,0,17,0,0,60,0) );
ReefAngel.AI.SetChannel( Blue, PWMParabola(9,0,20,0,15,100,MoonPhase()/20) );
ReefAngel.AI.SetChannel( RoyalBlue, PWMParabola(9,0,20,0,15,100,MoonPhase()/20) );
Re: Moonlights
Posted: Tue Apr 02, 2013 4:01 am
by ecam
Awesome. Thank you.
rimai wrote:Yeah, simply divide by whatever...
Let's say divide by 20 and you will get 0-5%.
Try this:
Code: Select all
ReefAngel.AI.SetChannel( White, PWMParabola(11,0,17,0,0,60,0) );
ReefAngel.AI.SetChannel( Blue, PWMParabola(9,0,20,0,15,100,MoonPhase()/20) );
ReefAngel.AI.SetChannel( RoyalBlue, PWMParabola(9,0,20,0,15,100,MoonPhase()/20) );
Re: Moonlights
Posted: Fri Apr 12, 2013 8:41 am
by ecam
ReefAngel.AI.SetChannel( Blue, PWMParabola(9,0,20,0,15,100,MoonPhase()/20) );
Roberto, is their a way to set a minimum intensity for the moonlights.
I want to do something where the result of the Moon phase string is evaluated (MoonPhase()/5) and if less then 4 then default to 4 (min).
Can this be done?
Thanks
rimai wrote:Yeah, simply divide by whatever...
Let's say divide by 20 and you will get 0-5%.
Try this:
Code: Select all
ReefAngel.AI.SetChannel( White, PWMParabola(11,0,17,0,0,60,0) );
ReefAngel.AI.SetChannel( RoyalBlue, PWMParabola(9,0,20,0,15,100,MoonPhase()/20) );
[/quote]
Re: Moonlights
Posted: Fri Apr 12, 2013 9:57 am
by rimai
Try this:
Code: Select all
ReefAngel.AI.SetChannel( RoyalBlue, PWMParabola(9,0,20,0,15,100,(MoonPhase()/20)<4 ? 4:MoonPhase()/20) );