This commit is contained in:
2026-01-15 15:00:21 +08:00
parent e67749e2e4
commit 419f6cc78c
705 changed files with 9981 additions and 35723 deletions

View File

@ -0,0 +1,35 @@
//======================================================================================================================
// SolarCalculator Library for Arduino example sketch: EquationOfTime.ino
//
// Plot the equation of time for a given year.
//
// Tested with Arduino IDE 1.8.19 and Arduino Uno
//======================================================================================================================
#include <SolarCalculator.h>
int year = 2022;
void setup()
{
Serial.begin(9600);
// Starting day (January 1)
JulianDay day(year, 1, 1);
for (int i = 0; i < 365; i++)
{
double eq;
calcEquationOfTime(day, eq);
// Print and view with serial plotter (Ctrl+Shift+L)
Serial.println(eq);
// Next day
++day.JD;
}
}
void loop()
{
}