Question: Write a C program to count the difference between the number of times two different buttons are pressed. a) The button pressing operation should be
Write a C program to count the difference between the number of times two different buttons are pressed.
a) The button pressing operation should be defined in an ISR.
b) Observe the count value from the watch window.
c) If button 1 is pressed more than button 2, then turn on the red color LED. If the button pressed numbers is equal, then turn on the blue color LED. Otherwise, turn on the green color LED. If the button press numbers are equal, then turn on the blue color LED.
Please explain working algorithm for button press program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
