IoT Projects
Gas Leak SMS Alert
Send an SMS when the MQ-2 detects gas or smoke.

Overview
The MQ-2 warms up and reports gas level on its analog pin. A SIM800L sends a text message, so the alert works even when there is no WiFi.
Build Steps
Warm up the MQ-2
Let the sensor heat for a few minutes and log normal room readings so you can pick a sensible threshold.
Power the SIM800L
Feed it about 4.0 V from an LM2596 with a 1000 µF capacitor close by; its 2 A peaks will reset a weak supply.
Wire serial
SIM800L TX/RX to software-serial pins and test with a manual AT command before connecting the sensor.
Send the alert
When the gas reading passes the threshold, send an SMS, then rate-limit so it does not text repeatedly.