AI Services Market › IoT Cases › Clap Toggle Switch
Day 26 of 100
Clap Toggle Switch
Smart Home · Board: ESP32 · Day 26 of 100
Clap once to toggle a light on the ESP32 using a sound sensor. Sound-triggered control with debounce done right.

How it works
The sound sensor's output spikes when a sharp noise like a clap crosses its sensitivity threshold. The ESP32 treats the first spike as a toggle command and then ignores further spikes for a short lockout window, so one clap means one toggle and echoes do not double-fire it.
What you'll learn
- Sound threshold detection
- Toggle state logic
- Debounce timing windows
- False-trigger filtering
Full project: code, wiring diagram & Wokwi simulation
The complete build guide lives in the original repo. Ours is a summary — the real thing is one click away.
Open full project on GitHub ↗Summary by AI Services Market. Project by Kritish Mohapatra — code and diagrams belong to the original repo.


