void loop() { // digital clock display of the time sprintf(msg_buff,"%02d:%02d:%02d %s",hour(),minute(),second(), dayStr(weekday())); sprintf(msg_buff,"%s %d %s %d\r\n",msg_buff, day(),monthStr(month()), year()); //Send the data uart_printf(msg_buff); // 1 sec delay delay(1000); }
/** * Display Date and Time with 'hh:mm:ss <CompleteNameDayWeek> dd <CompleteNameMonth> YYYY' format */ void longStrFormat_Display(){ timeComplete_Display(); Serial.print(" "); Serial.print(dayStr(weekday())); Serial.print(" "); Serial.print(day()); Serial.print(" "); Serial.print(monthStr(month())); Serial.print(" "); Serial.print(year()); }
void loop() { Serial.print(year(), DEC); Serial.print('/'); Serial.print(month(), DEC); Serial.print('/'); Serial.print(day(), DEC); Serial.print(" ("); Serial.print(monthStr(month())); Serial.print(") "); Serial.print(hour(), DEC); Serial.print(':'); Serial.print(minute(), DEC); Serial.print(':'); Serial.print(second(), DEC); Serial.println(); delay(5000); }