OptoBlog

OptoNews Tech Tip: Get sunrise/sunset times

Posted by Jean Femia on Jun 17, 2015 4:28:24 PM

SunsetOur tech tip this week comes from Philip in the OptoForum, who shared his PAC Control subroutine code for determining the time the sun rises and sets at a specific latitude. 

You could use HTTP requests over the Internet to get this data (discussed earlier in the same thread). But with this OptoScript code you don't need an Internet connection.

Really handy for remote installations.

SNAP PAC controllers have no problem with math, and Philip notes that this code is more reliable than photocells. He uses it for turning lights on and off. 

Read the OptoForum post and get the code. Thanks for sharing, Philip! 

Do you have some code to share, or a question you'd like answered?

Come to the OptoForum anytime to ask and answer all kinds of questions about anything Opto. We'll see you there.

Get the sunrise/sunset code


OptoNews June 17, 2015 - Read more in this issue:

Topics: Tips, optonews, PACs, OptoNews 2015-06-17

Written by Jean Femia

Jean Femia writes about technical subjects and has focused on automation and control systems for more than 15 years. She likes learning about technology and taking corners in her Honda S2000.
Find me on:

    Subscribe to Email Updates

    Recent Posts

    Posts by Topic

    see all