SunLocator

A lightweight solar calculator for sunrise, sunset and twilight times.

Author
Clifford Farrugia
Website
https://github.com/clifarr/sunlocator
Category
Timing
License
MIT
Library Type
Contributed
Architectures
Any

Computes the local time at which the sun reaches any elevation angle (the horizon, civil/nautical/astronomical twilight, or a custom angle) for a given date and location. Pure C++, no hardware or network dependencies, works on AVR, SAM, SAMD, ESP8266, ESP32, RP2040 and more. Ideal for switching lights, blinds or relays based on daylight.

Downloads

Filename Release Date File Size
SunLocator-1.0.0.zip 2026-10-12 22.25 KiB