ansh11
Member level 4
I am trying to understand switch bounce technique. I have seen tutorials and I have come up with some idea and I have created one flow chart
- Set periodic timer for 10ms
- read the button state at every 10ms and store into variable CurrentState
- Save the state of button into variable LastState
- Compare previous state with current state of button
- if both are same increment count
- check if counter has reached its maximum value
- if we get continues same state, button press was considered valid state