Nodemcu esp12e beginners problem

I’d need to see the sketch and the copied/pasted error message from the compiler, but it sounds like your Blynk libraries may not be installed correctly.

Pete.


#include <BlynkSimpleEsp8266.h>

#include <BlynkTimer.h>

#define BLYNK_PRINT Serial   

char auth[] = "eYOJ9pkawJlSNzDLlOPUd7RkipGWHvqO";

 

/* WiFi credentials */

char ssid[] = "ZONG MBB-E8231-6E63";

char pass[] = "electroniclinic";

 

BlynkTimer timer;

 

int mq135 = A0; // smoke sensor is connected with the analog 

int data = 0;

void setup()

{

Serial.begin(115200);

Blynk.begin(auth, ssid, pass);

timer.setInterval(1000L, getSendData);

}

 

void loop()

{

timer.run(); // 

Blynk.run();

}

 

/***************************************************

* Send Sensor data to Blynk

**************************************************/

void getSendData()

{

data = analogRead(mq135);

Blynk.virtualWrite(V2, data); //virtual pin V3

 

if (data > 600 )

{

Blynk.notify("Smoke Detected!!!");

}

}```

Sir pls reply

Well, if there is a fire detected then the “Smoke Detected!!!” notification will be sent once every second - until the smoke detector reading falls to 600 or less.

To overcome this you should use a variable as a flag to indicate that a notification has been sent already, and check this before sending another notification. The flag should be reset once the reading is 600 or below again.

Also, I’m a fan of using descriptive variable names such as “smoke-level” rather than “data”, and a function name of “take_smoke_level_reading” rather than “getSendData”.

Pete.

Would you sendsome example program that contains BlynkTimer in it.so that I can get some idea about how to use .

Multiple libraries were found for " BlynkSimpleEsp8266.h"
2_gas:3:23:fatal error:BlynkTimer.h:No such file or directory
Used:  C:\Users\india\Documents\Arduino\libraries\blynk-library-0.6.1
#include<BlynkTimer.h>
Not used: C:\Users\india\Documents\Arduino\libraries\Blynk.                ^
compilation terminated.
exit status 1
BlynkTimer.h:No such file or directory```


Sir pls give solution to  this problem

You are already using it in your sketch, in the correct way.

Pete.

Without some context this means nothing.

Pete.

I edit and shared it sir,pls reply

I’d guess that your Blynk library isn’t correctly installed.

Pete.