Does any one have sunrise to sunset code that I could use?

Does any one have sunrise to sunset code that I could use?


I ported a library from some code I found online a while back that works well with both Arduino and Linux. It will give you sunrise and sunset in the number of minutes from local midnight. It requires GPS coordinates and accurate wall clock time. You can find it at and see if it’s useful for you.

Again, you need accurate wall clock time, and you need coordinates to work from.

Thanks Peter

I take the Arduino comment back. It’s 32 bit, so it’s good for the M-core boards like the Teensy and Photon and the ARM Linux boards. I assume it would work with an 8 bit chip, but it might be painful as everything would be big math on those chips. And there is a lot of expensive math.

I was going to use it on a teensy so I think we should be ok t
Thanks again