Question: C program Use a button and an LED and write a program to implement the following: - When the button is pushed and released, the
C program
Use a button and an LED and write a program to implement the following:
- When the button is pushed and released, the program counts the number of seconds the button was pushed.
- If the button was pushed less than a second, after the button is released it prints the message "The push was not long enough!"
- If the button is pushed more than a second, after the button is released it makes the LED blink. The number of times the LED blinks is equal to the number of seconds the button was pushed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
