ESP32 MQ-2 Gas/Smoke Detector Alarm
In this project, combustible gas (LPG, methane, propane) and smoke detection is performed using an MQ-2 gas sensor module, and a siren-like alarm is played through a passive buzzer upon detection. The sensor's analog output (A0) is connected to an ADC pin on the ESP32 to read gas concentration; the alarm is triggered when the threshold is exceeded. Sensitivity is adjusted via the module's potentiometer. The passive buzzer is driven using `tone()` to produce a two-frequency siren effect.