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) );
Moonlights
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: Moonlights
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:
To this:
The last number is the parabola function is what you want to have after the light photo-period.
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() );
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) );
Roberto.
-
ecam
- Posts: 229
- Joined: Thu Nov 15, 2012 11:27 am
Re: Moonlights
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: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,15) ); ReefAngel.AI.SetChannel( RoyalBlue, MoonPhase() );The last number is the parabola function is what you want to have after the light photo-period.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) );
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: Moonlights
Yeah, simply divide by whatever...
Let's say divide by 20 and you will get 0-5%.
Try this:
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) );
Roberto.
-
ecam
- Posts: 229
- Joined: Thu Nov 15, 2012 11:27 am
Re: Moonlights
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) );
-
ecam
- Posts: 229
- Joined: Thu Nov 15, 2012 11:27 am
Re: Moonlights
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
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
[/quote]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) );
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: Moonlights
Try this:
Code: Select all
ReefAngel.AI.SetChannel( RoyalBlue, PWMParabola(9,0,20,0,15,100,(MoonPhase()/20)<4 ? 4:MoonPhase()/20) );
Roberto.