Пример скетча Arduino
#include <RiseSet.h>
float srise;
float sset;
float lat = 53.86;
float lon = 33.66;
//date Nov 5 2015
int day = 5;
int month = 11;
int year = 2015;
float zenith = 90.83; // offical: 90 degrees 50 ' = 90.83
// civil: 96 degrees
// nautical: 102 degrees
// astronomical: 108 degrees
int tz = 3;
RiseSet sun;
void setup() {
Serial.begin(9600);
while (!Serial.available()) {
//wait
}
}
void loop() {
srise = sun.sunrise(lat, lon, month, day, year, zenith, tz);
sset = sun.sunset(lat, lon, month, day, year, zenith, tz);
Serial.print("Sunrise time: "); Serial.println(srise);
Serial.print("Sunset time: "); Serial.println(sset);
delay(5000);
}