Im trying to run a servo using push button with esp8266 node mcu. The runs well but when I insert blynk statements it dosent run. Is my code is wrong plz help
#include <Servo.h>
#include <SimpleTimer.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
SimpleTimer timer;
Servo servo1;
char auth[] = "6ri9E_diXys4DvhS1ulntv8Tpa2kXdrk";
char ssid[] = "adik";
char pass[] = "1234567890";
WidgetLCD lcd1(V1);
void setup()
{
Serial.begin(9600);
pinMode(D5, INPUT);
servo1.attach(D8);
servo1.write(0);
Blynk.begin(auth, ssid, pass);
lcd1.clear();
timer.setInterval(1000L, servoDataSend); //timer will run every sec
}
void servoDataSend()
{
int key1 = digitalRead(D5);
if (key1 == HIGH)
{
servo1.write(90);
delay(2000);
servo1.write(0);
}
else
{
servo1.write(0);
}
}
void loop()
{
Blynk.run();
timer.run();
}