Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 1 month ago.
coding for push button
i made the coding for push button. once the button push, the counting showed on LCD will decrease.
the problem is, the counting remains decreasing as long as the button pushed. help me to find solution. tq
1 Answer
8 years, 1 month ago.
You want to count the number of times the pushbutton is pressed ? Review how your pushbutton code is working and look for a release of the pushbutton.
https://developer.mbed.org/users/4180_1/notebook/pushbuttons/
The pushbutton is mechanical so the contacts will bounce around a lot inside the switch. You must debounce the mechanical switch so that only a single logic level is detected for a press and the opposite logic state when the switch is released. Then this logic can be used to count the number of times the pushbutton is pressed. The above webpage should offer all you need.
Attach your code.....
posted by Dimitry Bresler 19 Jun 2016