Source code for gas sensor with nodemcu with blynk

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "fa35d55d100548848eac3eb0b649ddef";              //Your Project authentication key
char ssid[] = "vivo 1609";                                       // Name of your network (HotSpot or Router name)
char pass[] = "kesavvan";                                      // Corresponding Password
int gas_avalue;
int a= D3;
int s= D1;
void setup()
{
  pinMode(s, INPUT);
  pinMode(a, OUTPUT);
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
}
void loop()
{
  gas_avalue = digitalRead(s);
  if (gas_avalue < 1)
  {
    Serial.println("DANGER!!!!");
    Blynk.notify("DANGER!!!!!");
    digitalWrite(a,HIGH);
  }
  else
  {
    Serial.println("NO LEAKAGE");
    digitalWrite(a,LOW);
  }
  delay(100);
  Blynk.run();
}

Comments

  1. 'digital' was not declared in this scope

    The above line is appearing

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. WRITE digitalWrite

      IN THE PLACE OF digital.Write

      Delete
  2. To know more kindly WhatsApp to this no.9626965952

    ReplyDelete
  3. WRITE digitalWrite

    IN THE PLACE OF digital.Write

    ReplyDelete

Post a Comment

Popular Posts