- To investigate switch bouncing and to cope with it in mbed - FRDM-KL25Z.
- While a switch from the outside world bounces many times when clicked/pushed, our ucontroller will only react to it when it settles on a steady-state.
- I used flags to define if the switch is still bouncing or not over time intervals of 2ms.
- Tflag: Time flag, will be set when the time interval of 2ms has expired.
- SWflag: Switch flag, will be set when Tflag is set up and switch is not bouncing anymore.
- Using Timers in mbed.h.
- Finding out the count of a changing event over time periods in C++.
- Printing messages from ucontroller to "Terraterm" on PC.
- Blue trace: From the switch directly.
- Yellow trace: Our ucontroller reaction to the switch.