Question Solved1 Answer Write a C/C++ program to emulate a simple clock that shows current date and time on the host's display through the TeraTerm Emulator. The clock program has two part: Task#1) Setting the Time & Date using Switch statement Task#2) Displaying Time & Date using Nested-loop statement. The Clock program should print a message to the user ask him/her to enter the values of Date, Month and Year and Hour, Minutes, and Seconds. After a user enter the required information, the program will move to display mode. This program should be run on the mbed MCU. The messages and the time and date should be displayed on the host's display through the TeraTerm Emulator, while the required data for this program should be entered through the Teraterm Emulator using the host's keyboard. Note: The clock will be a 24-hour clock and so there will be no am/pm indicator in the clock

PBMDCF The Asker · Computer Science

Transcribed Image Text: Write a C/C++ program to emulate a simple clock that shows current date and time on the host's display through the TeraTerm Emulator. The clock program has two part: Task#1) Setting the Time & Date using Switch statement Task#2) Displaying Time & Date using Nested-loop statement. The Clock program should print a message to the user ask him/her to enter the values of Date, Month and Year and Hour, Minutes, and Seconds. After a user enter the required information, the program will move to display mode. This program should be run on the mbed MCU. The messages and the time and date should be displayed on the host's display through the TeraTerm Emulator, while the required data for this program should be entered through the Teraterm Emulator using the host's keyboard. Note: The clock will be a 24-hour clock and so there will be no am/pm indicator in the clock
More
Transcribed Image Text: Write a C/C++ program to emulate a simple clock that shows current date and time on the host's display through the TeraTerm Emulator. The clock program has two part: Task#1) Setting the Time & Date using Switch statement Task#2) Displaying Time & Date using Nested-loop statement. The Clock program should print a message to the user ask him/her to enter the values of Date, Month and Year and Hour, Minutes, and Seconds. After a user enter the required information, the program will move to display mode. This program should be run on the mbed MCU. The messages and the time and date should be displayed on the host's display through the TeraTerm Emulator, while the required data for this program should be entered through the Teraterm Emulator using the host's keyboard. Note: The clock will be a 24-hour clock and so there will be no am/pm indicator in the clock
See Answer
Add Answer +20 Points
Community Answer
Q5FGO3
See all the answers with 1 Unlock
Get 4 Free Unlocks by registration

Implementation of the C time.h functions   Provides mechanisms to set and read the current time, based  on the microcontroller Real-Time Clock (RTC), plus some  standard C manipulation and formating functions.    @code  #include "mbed.h"    int main() {      set_time(1256729737);  // Set RTC time to Sunday, 13 Sep 2020 11:35:37       while(1) {          time_t seconds = time(NULL);            printf("Time as seconds since January 1, 1970 = %d ", seconds);          printf("Time as a basic string = %s", ctime(&seconds));           char buffer[32];    ... See the full answer