# Clap Toggle Switch

Day 26 of the 100 Days 100 IoT Projects collection. Board: ESP32.

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): https://github.com/kritishmohapatra/100_Days_100_IoT_Projects/tree/main/Clap_Toggle_Switch_using_ESP32_&_Digital_Sound_Sensor_(MicroPython)

Summary by SkillShop. Code and diagrams belong to the original repo.
