can someone help me for my fyp, i newbie and want to learn something new, i want make window notification by using reed switch and esp8266 but my blynk say “Wasn’t online yet”. iI I using mobile hospot for connection on my esp8266. I hope anyone can help me, this is part of my fyp.
this is code that im copy from the internet
//Viral Science www.youtube.com/c/viralscience www.viralsciencecreativity.com
//Blynk Door Security Notification System
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
char auth[] = "1ABXCH8eh9ec2s_vRfWIuZjwnMWQKUng"; //Enter the authentication code sent by Blynk to your Email
char ssid[] = "AndroidAP"; //Enter your WIFI SSID
char pass[] = "ahmadbuhairi"; //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=1;
}
else if (isButtonPressed==0)
{
flag=0;
}
}
void setup()
{
Serial.begin(74880);
Blynk.begin(auth, ssid, pass);
pinMode(D1,INPUT_PULLUP);
timer.setInterval(16000L,notifyOnButtonPress);
}
void loop()
{
Blynk.run();
timer.run();
}