hello everyone
my notification widget gives no notification, while it prints button pressed in serial print
nodeMCU, is what i am using
here’s the code
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
char auth[] = "1eab 6ea58a645"; //Enter the authentication code sent by Blynk to your Email
char ssid[] = "corph"; //Enter your WIFI SSID
char pass[] = "corph@corph"; //Enter your WIFI Password
int flag=0;
void notifyOnButtonPress()
{
int isButtonPressed = digitalRead(D1);
if (isButtonPressed==1 && flag==0) {
Serial.println("Someone Opened the door");
Blynk.notify("Alert : Someone Opened the door");
flag=0;
}
else if (isButtonPressed==0)
{
flag=0;
}
}
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
pinMode(D1,INPUT_PULLUP);
timer.setInterval(16000L,notifyOnButtonPress);
}
void loop()
{
Blynk.run();
timer.run();
}
thanks