View Single Post
Pazuzu Pazuzu is offline
Registered
 
Join Date: Apr 2008
Location: Houston TX
Posts: 8,742
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.
__________________
Mike Bradshaw

1980 911SC sunroof coupe, silver/black
Putting the sick back into sycophant!
Old 07-26-2022, 08:42 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #2 (permalink)