Dusk2Dawn

Good evening,

I am trying to turn an inside nightlight (kids bedroom), using an Arduino or clone, using something like DM Kashi’s Dusk2Dawn code.

I need to do this, as the arangement of the walls/windows does not allow for a simple nightlight with a photocell (VERY old, odd shaped house)

What I would like to do is at sunset set an output pin to 1, send it to a latching relay board, and turn the light on. At sunrise, send a 0 to turn the relay off.

That said, my old brain is having issues creating the code to change the time to an 1 or 0, and I am sure it is right in front of my eyes. AAAARRRRGGGGGHHHH!!!

Thanks for any help anyone might be able to provide me with.

Respectfully,

Bobb

Is the code publicly availible?

Yes on GitHub called Dusk to Dawn from DM Kashi.

I meant a copy of your custom code, actually.