#include "./Display.h"
#include "./NTP.h"
#include <RTClib.h>
#include "buzzer_led.h"
static RTC_DS1307 rtc;
void setup() {
/* init tasks begin */
ntp::init();
/* init tasks end */
/* setup begin */
rtc.begin();
rtc.adjust(DateTime(2001, 10, 18, 16, 33, 54));
/* setup end */
}
void loop() {
/* loop begin */
static LCD x(16, 2);
if (ntp::serial_in_use)
{
rtc.adjust(DateTime(ntp::yy, ntp::mm, ntp::dd, ntp::hh, ntp::tt, ntp::ss));
ntp::serial_in_use = 0x0;
}
DateTime now = rtc.now();
x.clock_screen(now.year(), now.month(), now.day(), now.hour(), now.minute(), now.second());
vTaskDelay(1000 / portTICK_PERIOD_MS);
/* loop end */
}