Question: Use a button and an LED and write a program to implement the following: - When the button is pushed and released, the program counts

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.

must use #include and #include , show comments.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!