Question: For arduino. Problem 2(a): Write a sketch to create the following countdown timer. At startup, the serial monitor will display: Enter an integer between 5
For arduino.

Problem 2(a): Write a sketch to create the following countdown timer. At startup, the serial monitor will display: "Enter an integer between 5 and 20:". If the user enters an integer outside this range or a non-integer, the program will display "Try again:" and wait for user input, N. At 1 second intervals, the serial monitor will display, N, N-1,... (e.g. 16, 15, 14,... down to 0, and then stop. If the user types "Restart", it will restart the countdown from N Try implementing the above both with and without timer interrupts. Problem 2(b): Enhance the above sketch as follows (preferably using timer interrupts). In the middle of the countdown (before it reaches 0), if the user types "Pause", the countdown will pause (e.g. at the value M). It will resume again (from M) when the user types "Resume" If the user types "Reset" (whether in the middle of the countdown or in the paused state) the countdown will restart from N. . . Problem 2(a): Write a sketch to create the following countdown timer. At startup, the serial monitor will display: "Enter an integer between 5 and 20:". If the user enters an integer outside this range or a non-integer, the program will display "Try again:" and wait for user input, N. At 1 second intervals, the serial monitor will display, N, N-1,... (e.g. 16, 15, 14,... down to 0, and then stop. If the user types "Restart", it will restart the countdown from N Try implementing the above both with and without timer interrupts. Problem 2(b): Enhance the above sketch as follows (preferably using timer interrupts). In the middle of the countdown (before it reaches 0), if the user types "Pause", the countdown will pause (e.g. at the value M). It will resume again (from M) when the user types "Resume" If the user types "Reset" (whether in the middle of the countdown or in the paused state) the countdown will restart from N
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
