10 #if defined(USE_DS1302) 15 #elif defined(USE_DS1307) 20 #if defined(USE_SOFTWARE_TWI) 22 #include "Software/TWI.h" 23 Software::TWI<BOARD::D18, BOARD::D19>
twi;
26 #include "Hardware/TWI.h" 27 Hardware::TWI
twi(100000UL);
47 struct tm now(SATURDAY, 2000, JANUARY, 1, 23, 59, 30);
59 if (!rtc.
tick())
return;
61 uint32_t start = millis();
66 Serial.print(millis() / 1000.0);
70 Serial.print(time =
mktime(&now));
73 Serial.print(F(
":wday="));
75 Serial.print(F(
",yday="));
77 Serial.print(F(
",utc+"));
81 Serial.print(F(
"=\""));
85 Serial.print(F(
"\",utc=\""));
93 delay(1000 - (millis() - start));
int16_t tm_yday
days since January 1 [0-365].
time_t mktime(struct tm *timeptr)
struct tm * gmtime_r(const time_t *timer, struct tm *timeptr)
void set_time(time_t time)
int8_t tm_wday
Days since Sunday [0-6].
#define isotime_r(tm, buf)
Hardware::TWI twi(100000UL)