Question: Write a program using FreeRTOS that performs the following: The user should enter the number of minutes and seconds desired for the program to count
Write a program using FreeRTOS that performs the following:
The user should enter the number of minutes and seconds desired for the program to count down. The program will act like an alarm clock or countdown timer.
The program has two tasks: TimeTask, DisplayTask
The program has one queue that is shared by all of the tasks: timeQueue
TimeTaskwill keep track of the number of seconds remaining. Once every second, this task should send the number of seconds remaining to the DisplayTaskvia the timeQueue.
DisplayTaskshould retrieve numbers from timeQueueand print the value in the format of minutes and seconds
Expected Output
Enter minutes: 3
Enter seconds: 45
Time remaining: 3:45
Time remaining: 3:44
Time remaining: 3:43
...
Time remaining: 0:02
Time remaining: 0:01
Time is up!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
