#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth = “My Auth code”;
// Your WiFi credentials.
// Set password to “” for open networks.
char ssid = “My network”;
char pass = “my Pass”;
Servo myservo;
int myservo = 1023/2;
BLYNK_WRITE(V0)
{
myservo = param.asInt();
}
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
myservo.attach(D1);
}
void loop()
{
Blynk.run();
}
ERRORS
ESP8266_Standalone:41: error: ‘Servo’ does not name a type
Servo myservo;
^
C:\Users\elebo\AppData\Local\Temp\arduino_modified_sketch_186411\ESP8266_Standalone.ino: In function ‘void setup()’:
ESP8266_Standalone:54: error: request for member ‘attach’ in ‘myservo’, which is of non-class type ‘int’
myservo.attach(D1);
^
exit status 1
‘Servo’ does not name a type