Hello, I am using a photocell to open my blinds automatically at dusk.
I currently use a < 70 reading to trigger the blind motors (please note....the motors aren't really blind
I would like to trigger the motors only at dawn and not at dusk.
How would I program that?
I am thinking a statement that says if the readings are increasing (going from dark to light) then trigger.
Here is a small portion of my code (flag is the state of the blinds, 0 = closed, 1 = open
flag = EEPROM.read(100);
if (photocellReading < 70 && flag == 0)
You could study the Arduino State Change example to learn how to detect dawn, rather than dusk (rising intensity, rather than falling). Basically, you compare readings taken a few minutes apart.