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.