Good MoonCycle code to use

Do you have a question on how to do something.
Ask in here.
Post Reply
User avatar
JNieuwenhuizen
Posts: 96
Joined: Thu Feb 16, 2012 12:39 am
Location: South Africa

Good MoonCycle code to use

Post by JNieuwenhuizen »

Hi.

I have had a few looks around the forum, and have found some nice little codes for Moon Cycles.

Is there anyone using some interresting MoonCycle code? Or is the PWMSlope- the best way?

Regards
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Good MoonCycle code to use

Post by rimai »

What did you have in mind?
I just have them dim according to the moon cycles.
Roberto.
abhi_123
Posts: 216
Joined: Tue Mar 20, 2012 8:34 am

Re: Good MoonCycle code to use

Post by abhi_123 »

Just my few cents. Cant we have random night cloud in moon phase & eclipse depending upon full moon & no moon nights?
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Good MoonCycle code to use

Post by rimai »

You can code whatever you want in your controller.
That's why it is open source :)
Roberto.
User avatar
JNieuwenhuizen
Posts: 96
Joined: Thu Feb 16, 2012 12:39 am
Location: South Africa

Re: Good MoonCycle code to use

Post by JNieuwenhuizen »

rimai wrote:What did you have in mind?
I just have them dim according to the moon cycles.
Thats fine, a basic MoonCycle. Problem is I am lost with this, there is 2/3 versions of the code. You made a little code that allows PWMSlope over 00h00 , so that I have, and the phases? There is a few different versions.

What are you using Roberto?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Good MoonCycle code to use

Post by rimai »

I just turn them on according to moon cycles.

Code: Select all

  if (hour()>=21 || hour()<=8) // Turn Moonlights on/off
  {
    ReefAngel.PWM.SetActinic(MoonPhase());
    ReefAngel.PWM.SetDaylight(MoonPhase());
  }
  else
  {
    ReefAngel.PWM.SetActinic(0);
    ReefAngel.PWM.SetDaylight(0);
  }
Roberto.
Post Reply