2024-08-18 11:34 PM
hello guys i have code that i want to show time on lcd but i have problem when i use HAL_RTC_GetTime the time stock on the time i use HAL_RTC_GetTime and i use interrupt to switch between time lcd and main menu
time show :
RTC_TimeTypeDef gTime = {0};
HAL_RTC_GetTime(&hrtc, &gTime, RTC_FORMAT_BIN);
ssd1306_Fill(Black);
ssd1306_SetCursor(0, 0);
menu[0] = '\0';
sprintf(menu, "%d:%d:%d", gTime.Hours,gTime.Minutes,gTime.Seconds);
ssd1306_WriteString(menu, Font_7x10, White);
menu[0] = '\0';
2024-08-19 12:23 AM
After reading time, you have to read date, too.
JW