View Single Post
masraum masraum is online now
Back in the saddle again
 
masraum's Avatar
 
Join Date: Oct 2001
Location: Central TX west of Houston
Posts: 56,752
Quote:
Originally Posted by Pazuzu View Post
Tangentially related...

We built a street sign for the Lab, and illuminated it with several LEDs. The LEDs were being controlled via an Arduino microprocessor.
We didn't want to leave the lights on all of the time, so we decided to turn them on at dusk. Option one was to just turn them on every night at 6pm. Option two was to use a light sensor. But, we're super nerds, so we used option three. We wrote code to solve the solar equation of time and calculate on the fly, each day, the local sunset time for the sign, and turn the lights on then. We approximated a few lines for brevity and to fit in the Arduino memory, but it's within 5 minutes on any given day.
Nice. So you cover the changing daylight throughout the year as well as DST. Cool.
__________________
Steve
'08 Boxster RS60 Spyder #0099/1960
- never named a car before, but this is Charlotte.
'88 targa SOLD 2004 - gone but not forgotten
Old 07-27-2022, 05:52 AM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #3 (permalink)