Closed anuradhawick closed 3 years ago
Hi.
https://github.com/tanakamasayuki/I2C_BM8563/blob/master/examples/BM8563_SET_NTP/BM8563_SET_NTP.ino
// Print RTC
Serial.printf("%04d/%02d/%02d %02d:%02d:%02d\n",
dateStruct.year,
dateStruct.month,
dateStruct.date,
timeStruct.hours,
timeStruct.minutes,
timeStruct.seconds
);
The numbers are the values that can be output.
2021-04-19(today) dateStruct.year = 2021 dateStruct.month = 4 dateStruct.date = 19
https://lang-ship.com/blog/work/m5stickc-rtc-ntp/
static const char *wd[7] = {"Sun","Mon","Tue","Wed","Thr","Fri","Sat"};
M5.Lcd.printf("Week: %s\n", wd[RTC_DateStruct.WeekDay]);
Sun = 0
Thanks! Much wanted help. Cheers.
Hi,
I am using M5Stick C Plus. I want to know how the date setting works.
Is Monday = 1 ? Is January = 1?
I assume the year and day of the month are set as they are.
Help is appreciated. Thanks