Nodemcu ESP8266 sends wrong signal

I have just made a Door Security Notification Project using esp8266. But, it sends wrong signal. When it is connected works automatically without changes. Sometimes, it is disconnected automatically.

I have used the following code:

//Blynk Door Security Notification System

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
char auth[] = "4k1JfmpomK69_N1LP8goni8DVSVs7F4r";
char ssid[] = "Safwan";
char pass[] = "@2255222";
int flag = 0;

void notifyOnButtonPress()
  int isButtonPressed = digitalRead(D1);
  if (isButtonPressed == 1 && flag == 0) {
    Serial.println("Someone Opened the door");
    Blynk.notify("Alert!shit Someone just Opened the door");
    flag = 1;
  else if (isButtonPressed == 0)
    flag = 0;
void setup()
  Blynk.begin(auth, ssid, pass);
  pinMode(D1, INPUT_PULLUP);
  timer.setInterval(16000L, notifyOnButtonPress);
void loop()

But,it replies:

/home/builder/opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -hardware /home/builder/opt/arduino-builder/hardware -hardware /home/builder/.arduino15/packages -tools /home/builder/opt/arduino-builder/tools -tools /home/builder/.arduino15/packages -built-in-libraries /home/builder/opt/libraries/latest -logger humantags -fqbn esp8266:esp8266:arduino-esp8266:BoardModel=starottodeved,baud=115200,dbg=Disabled,eesz=4M3M,exception=disabled,ip=lm2f,lvl=None____,vt=flash,wipe=none,xtal=80 -build-cache /tmp -build-path /tmp/569013795/build -verbose -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -prefs -libraries /tmp/569013795/custom -libraries /tmp/569013795/pinned /tmp/569013795/Blynk_Doorsecurity_Notification

Multiple libraries were found for "BlynkSimpleEsp8266.h"

Used: /home/builder/opt/libraries/latest/blynk_1_0_1

Not used: /home/builder/opt/libraries/latest/blynk_for_chinese_0_5_9

Using library ESP8266WiFi at version 1.0 in folder: /home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/libraries/ESP8266WiFi

Using library blynk_1_0_1 at version 1.0.1 in folder: /home/builder/opt/libraries/latest/blynk_1_0_1

/tmp/569013795/Blynk_Doorsecurity_Notification/Blynk_Doorsecurity_Notification.ino: In function 'void notifyOnButtonPress()':

/tmp/569013795/Blynk_Doorsecurity_Notification/Blynk_Doorsecurity_Notification.ino:16:37: error: 'D1' was not declared in this scope

int isButtonPressed = digitalRead(D1);


/tmp/569013795/Blynk_Doorsecurity_Notification/Blynk_Doorsecurity_Notification.ino: In function 'void setup()':

/tmp/569013795/Blynk_Doorsecurity_Notification/Blynk_Doorsecurity_Notification.ino:31:11: error: 'D1' was not declared in this scope

pinMode(D1, INPUT_PULLUP);


exit status 1

What you have posted as "it replies" is a part of the protocol of the compiling-process.

This means these are messages from the Arduino-IDE and not from your ESP8266.
What do you mean with "disconnects automatically?"
Disconnecting from your WLAN-Router?
Disconnecting from Blynk?
Disconnecting from your Computer?

Please describe in more details what happens.

Start with I "click on the upload button in the arduino-IDE
and then describe in detail what happends

best regards Stefan

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.