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();
}
#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();
}
'digital' was not declared in this scope
ReplyDeleteThe above line is appearing
This comment has been removed by the author.
DeleteWRITE digitalWrite
DeleteIN THE PLACE OF digital.Write
To know more kindly WhatsApp to this no.9626965952
ReplyDeleteWRITE digitalWrite
ReplyDeleteIN THE PLACE OF digital.Write
Thank You buddy !!
Deletebro why its turn off :) use state
ReplyDelete