Case File: One Press, Nine Events
A mechanical push button does not close cleanly: for a few milliseconds the contacts bounce, and a program that counts every change counts one press as nine. Walk a recording of the pin, keep a debounced state that changes only when a new value has lasted a whole stable time, record the events with their times, and count the presses and the raw changes that were only bounce. Run it on recordings that you cannot see. The recording is generated for you alone.
Case File: One Press, Nine Events
A mechanical push button does not close cleanly: for a few milliseconds the contacts bounce, and a program that counts every change counts one press as nine. Walk a recording of the pin, keep a debounced state that changes only when a new value has lasted a whole stable time, record the events with their times, and count the presses and the raw changes that were only bounce. Run it on recordings that you cannot see. The recording is generated for you alone.
In this lesson:
- debounce
- input
- switch
- state machine
- python
- case-file
This lesson is part of a paid plan
Upgrade to Pro to unlock this course, its labs and its exam.
View Pricing Plans