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
Smoke Detector And Fire Alarm System Using Arduino And Gsm
Just Do Electronics
August 04, 2020
Circuit Diagram :-
Code :-
//Prateek //www.prateek.in #include
LiquidCrystal_I2C lcd(0x27, 16, 2); const int redLed = 4; int greenLed = 6; const int buzzer = 5; int smokeA0 = A0; const int flame = 2; int Flame = HIGH; int sensorThres = 150; void setup() { pinMode(redLed, OUTPUT); pinMode(buzzer, OUTPUT); pinMode(greenLed, OUTPUT); pinMode(smokeA0, INPUT); pinMode(flame, INPUT); lcd.init(); lcd.backlight(); lcd.clear(); Serial.begin(9600); lcd.begin(16,2); } void loop() { int analogSensor = analogRead(smokeA0); Serial.print("Pin A0: "); Serial.println(analogSensor); lcd.print("Smoke Level: "); lcd.print(analogSensor-50); lcd.setCursor(0, 1); lcd.print("Flame low"); Flame = digitalRead(flame); if (Flame== LOW) { lcd.setCursor(0, 1); lcd.print("Flame High"); digitalWrite(redLed, HIGH); delay(5000); digitalWrite(buzzer, HIGH); delay(5000); digitalWrite(greenLed, LOW); } if (analogSensor-50 > sensorThres) { digitalWrite(redLed, HIGH); digitalWrite(buzzer, HIGH); Serial.println("AT+CMGF=1"); delay(1000); Serial.println("AT+CMGS=\"+918830584864\"\r"); Serial.println("Flre And Smoke Alert"); Serial.println((char)26); digitalWrite(greenLed, LOW); } else { digitalWrite(redLed, LOW); digitalWrite(greenLed, HIGH); digitalWrite(buzzer, LOW); } delay(500); lcd.clear(); }
2 Comments
Unknown
19 September 2021 at 08:31
Please share wire of pcb
Reply
Delete
Replies
Reply
Unknown
19 September 2021 at 08:32
Please share wireing of header pins
Reply
Delete
Replies
Reply
Add comment
Load more...
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)
Ultrasonic Sensor as a Counter with Arduino
OTP Based Door Lock Using Arduino And SIM800L
IoT Based Patient Health Monitoring System Using Blynk App
ESP32 Interfacing With LDR Sensor
Nodemcu Interfacing With Em-18
MLX90614 Non-Contact Infrared Thermometer With Arduino
ESP32 Led Blink With Push Button
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
2 Comments
Please share wire of pcb
ReplyDeletePlease share wireing of header pins
ReplyDelete