How to Make IOT BASED LPG LEAKAGE DETECTION SYSTEM

 


                                  Full Video 


Free Code :-

#define BLYNK_TEMPLATE_ID "TMPL3DV-hZyu7"

#define BLYNK_TEMPLATE_NAME "IOT GAS Leakage Detector"

#define BLYNK_AUTH_TOKEN "ZntdeW8MQ0kJMnQSjBwjdn7xPA7ipfp1"

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2);



char auth[] = BLYNK_AUTH_TOKEN;


char ssid[] = "IOT";  // Enter your wifi name

char pass[] = "00000000";  // Enter your wifi password

int smokeA0 = A0;

int data = 0;

int sensorThres = 100;

int BUZZER = D0;

int FAN = D8; // Relay

int SIM = D7;//GSM system

BlynkTimer timer;


void sendSensor(){



int data = analogRead(smokeA0);

Blynk.virtualWrite(V0, data);

  Serial.print("Pin A0: ");

  Serial.println(data);



  if(data > 449)     // Change the Trashold value

  {


    Blynk.logEvent("iot_device","Gas Leakage Detected");

  }

}


void setup(){

  pinMode(smokeA0, INPUT);

   Serial.begin(115200);

  Blynk.begin(auth, ssid, pass);

  //dht.begin();

  timer.setInterval(2500L, sendSensor);

}


void loop(){
Blynk.run();

  timer.run();

}
  Blynk.run();

  timer.run(

Comments

Popular posts from this blog

Servo Motor Control Using By Bluetooth HC-05

Best IOT Project By Technical idEas