r/ArduinoProjects • • 17d ago

Showcased Project ESP32 Wi-Fi doorbell: one button press counted as four (debounce fix)

Built a local Wi-Fi doorbell on an ESP32: press a tactile button, a piezo dings, and a page on any browser (phone, PC, or tablet) on the same LAN counts the ring.

First version counted four rings for one press — classic button bounce. Fix: debounce with a 50 ms quiet window before trusting the new level.

Hardware

- ESP32 DevKit (30-pin)

- 6 mm tactile push button

- Passive piezo buzzer

- 4 jumpers + breadboard

Wiring

- GPIO33 → button → GND (INPUT_PULLUP)

- GPIO25 → piezo → GND

How it works

  1. ESP32 joins Wi-Fi and hosts a tiny HTML page
  2. Every pin change restarts a 50 ms timer
  3. Only a level that holds still that long counts as a press
  4. On press: tone() ding + ring counter updates; page refreshes every 2 s

Happy to share the sketch if useful. Short walkthrough: https://www.youtube.com/shorts/dRv68Y1i5f0

2 Upvotes

0 comments sorted by