|
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!
|