What they are and how they work
The kit includes six pushbuttons. Pressing changes the connection between contacts; releasing returns the switch to its initial state. A microcontroller reads this change as a digital input. Software decides whether a press starts an action, changes a setting or increments a counter.
The four physical legs of a common tactile button do not mean four independent switches: some terminals are already connected internally. During a press, contacts may bounce briefly before settling. Without debouncing, software can interpret one physical press as several events.
What we can use them for
- Add start, pause and reset controls to a timer.
- Select an OLED screen or adjust a chosen setting.
- Build a reaction game with LED prompts and score counting.
First exercise
With power disconnected, use a multimeter to identify connected terminal pairs and the change when pressed. Connect an input using a suitable pull-up or pull-down arrangement and observe its state. Add software debouncing and count transitions into the pressed state only. Holding the button should then leave the counter unchanged.
Handling notes
The input needs a defined level when the button is released. Use an internal pull-up only on an ESP32 pin that supports it. Avoid shorting the supply through the switch. Verify terminals by measurement, not the direction of the red cap. Keep ESP32 input signals at suitable 3.3 V levels.
Source: Adafruit — Bouncing Inputs.
