'loop that turns on for 1 hour at dusk each day for a year
I've been asked to help an art project that will be collecting the sunlight at dusk for 1 hour each day for a whole year. This is not about efficiency, this is art.
We have a solar panel and 12v battery. The part that we're struggling with is how to make it only collect for the 1 hour at dusk. I know some python but not enough to understand how to make a switch that works everyday at a different time each day. I guess it will require something like an arduino to connect the battery to the solar panel, plus some other things I haven't thought of.
This is some pseudocode for what I would like it to do
file with date and time of dusk
infinite loop:
if date and time match the date and time from file:
start solar panel and record input
after 1 hour:
stop solar panel and recording input
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|