Home
About Us
Achievement
Home
Raspberry-Pi Projects
_Raspberry Pi 4 Complete Guide
Arduino Project
_All Projects
Esp8266 Project
_All Projects
Esp32 Project
_Automation-with-feedback
Arduino Based Gas Leakage Detector with SMS Alert Using GSM Module
Just Do Electronics
September 18, 2021
Circuit Diagram :-
Code :-
//Prateek //www.prateeks.in #include
#include
#include
LiquidCrystal_I2C lcd(0x27, 16, 2); SoftwareSerial mySerial(2, 3); int gasValue = A1; // smoke / gas sensor connected with analog pin A1 of the arduino / mega. int data = 0; int Red = 3; int Green = 4; void setup() { randomSeed(analogRead(1)); mySerial.begin(9600); // Setting the baud rate of GSM Module Serial.begin(9600); // Setting the baud rate of Serial Monitor (Arduino) lcd.init(); lcd.backlight(); pinMode(gasValue, INPUT); pinMode(Red, OUTPUT); pinMode(Green, OUTPUT); lcd.print (" WELCOME TO"); lcd.setCursor(0, 1); lcd.print ("JSUTDOELECTRONIC"); delay(3000); lcd.clear(); lcd.print (" Gas Leakage "); lcd.setCursor(0, 1); lcd.print (" Detector Alarm "); delay(3000); lcd.clear(); } void loop() { data = analogRead(gasValue); Serial.print("Gas Level: "); Serial.println(data); lcd.print ("Gas Scan is ON"); lcd.setCursor(0, 1); lcd.print("Gas Level: "); lcd.print(data); delay(1000); if ( data > 80) // { SendMessage(); Serial.print("Gas detect alarm"); lcd.clear(); lcd.setCursor(0, 0); lcd.print(" Gas Leakage"); lcd.setCursor(0, 1); lcd.print(" SMS Sent"); delay(1000); digitalWrite(Red, HIGH); digitalWrite(Green, LOW); } else { Serial.print("Gas Level Low"); lcd.clear(); lcd.setCursor(0, 0); lcd.print("Gas Level Normal"); digitalWrite(Red, LOW); digitalWrite(Green, HIGH); delay(1000); } lcd.clear(); } void SendMessage() { //Prateek //www.prateeks.in Serial.println("I am in send"); mySerial.println("AT+CMGF=1"); //Sets the GSM Module in Text Mode delay(1000); // Delay of 1000 milli seconds or 1 second mySerial.println("AT+CMGS=\"+918830584864xx\"\r"); // Replace x with mobile number delay(1000); mySerial.println("Hi Prateek Gas Detected plz Open Windows And Check Your Gas Cylinder");// The SMS text you want to send delay(100); mySerial.println((char)26);// ASCII code of CTRL+Z delay(1000); }
Video :-
0 Comments
Newer
Older
Build Your Own Gps Tracking System using Arduino
How To Make RFID & Keypad Based Door Lock
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
ESP32 Interfacing With LDR Sensor
Ultrasonic Sensor as a Counter with Arduino
Nodemcu Interfacing With Em-18
IoT Based Patient Health Monitoring System Using Blynk App
OTP Based Door Lock Using Arduino And SIM800L
MLX90614 Non-Contact Infrared Thermometer With Arduino
Esp32 Cam Based Face Unlock
YouTube
Like on Facebook
Follow on Twitter
Follow on Google+
Follow on Instagram
Subscribe on Youtube
Hi WelCome To My Website If you have a creative mind and want to learn Electronics even without studying it then FRIENDS this Website And Youtube Channel is for you, I am crazy creators who love making Electronics things. I have a bunch of more than 130 Tutorial Videos on My YouTube Channel and I upload a new Tutorial every Sunday.
Tags
Arduino Project
Esp32 Project
Esp8266 Project
0 Comments