Page 1 of 1
Simple sunrise/sunset
Posted: Thu Aug 09, 2012 5:47 am
by lnevo
Is there any basic code to get sunrise/sunset. I'm not using the PWM expansion and not using dimmable lights, so for now just want to base my lighting schedule on sun up and sun down...worst case I can strip down the full weather example, but hoping someone had an existing simplified version to work with.
Thanks
Lee
Re: Simple sunrise/sunset
Posted: Thu Aug 09, 2012 7:59 am
by rimai

You will need to talk to rufessor or strip his code down
Re: Simple sunrise/sunset
Posted: Thu Aug 09, 2012 8:44 am
by DrewPalmer04
No dimmable ballasts? Um...you best you can do is use the ReefAngel.Light and turn on actinic then daylight bulbs?.....Then reverse for sunset?
Re: Simple sunrise/sunset
Posted: Thu Aug 09, 2012 9:30 am
by lnevo
Yeah, I'll need to just use the Standard Light functions which is why I asked the question, I don't need to do all the calculations for weather / clouds, or PWM slopes to gently rise and set... but I would like my On time and Off time to be synchronized with SunRise and SunSet...
I looked at the code, and it should be pretty easy to get the info I need, I just may have to convert the time info coming from the functions to hour / minute notation in order to make an easy if / then statement...
If anyone has done this already, let me know, otherwise as soon as I get around to modifying the code, I will post it.
Re: Simple sunrise/sunset
Posted: Thu Aug 09, 2012 9:48 am
by rimai
I'd love to see what you can come up with. We can eventually add this to the libs

Re: Simple sunrise/sunset
Posted: Thu Aug 09, 2012 10:13 am
by lnevo
Yeah, it looks like only a few functions actually came out of the libraries that rufessor used are needed and there are 2 functions used to calculate the SunRise and SunSet that could be made public. The key will be having them come out in a usable format to turn on / off the lights. Would be a similar use to the Moonphase() function hopefully.
Re: Simple sunrise/sunset
Posted: Thu Aug 09, 2012 10:15 am
by DrewPalmer04
Oh I get it! Yes I would love this as well!