Answered step by step
Verified Expert Solution
Question
1 Approved Answer
It's an Energia sketch using C language. We work with MSP430 Launchpad but you shouldn't need it to write the code. I'm really stuck :(
It's an Energia sketch using C language. We work with MSP430 Launchpad but you shouldn't need it to write the code.
I'm really stuck :(
C language, it needs to be written in C language. That's the language used in Energia.
Write a sketch to create the following countdown timer. You MUST use timer interrupts. At startup, the serial monitor will display: Enter an integer between 5 and 20: and record the user's input as N. If 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. In the middle of a 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) only when the user types Resume. If the user types Pause" or "Resume after a countdown is complete, the program will display No countdown in progress. At any time (during a countdown, after a countdown is complete, or in the paused state), if the user types "Restart, it will restart the countdown from N. Write a sketch to create the following countdown timer. You MUST use timer interrupts. At startup, the serial monitor will display: Enter an integer between 5 and 20: and record the user's input as N. If 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. In the middle of a 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) only when the user types Resume. If the user types Pause" or "Resume after a countdown is complete, the program will display No countdown in progress. At any time (during a countdown, after a countdown is complete, or in the paused state), if the user types "Restart, it will restart the countdown from NStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started