#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <Servo.h>
#include <Blynk.h>
char auth [] = “BiM28uxFGJVc5iS3kpT7F4Wg-Ad5D9DF” ;
char ssid [] = “polnep” ;
char pass [] = “elektronika” ;
int slider;
BLYNK_WRITE(V0)
{
int pinvalue = param.asInt();
}
Servo m1;
Servo m2;
Servo m3;
Servo m4;
void setup()
{
// Debug console
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
m1.attach(D5); //Pins are attatched to the D5,D6,D7,D8 pins of the NODEMCU which produces pwm//
m2.attach(D6);
m3.attach(D7);
m4.attach(D8);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, “blynk-cloud.com”, 8442);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
}
void loop() {
Blynk.run();
Serial.print(slider);
Serial.println();
m1.write(slider);
m2.write(slider);
m3.write(slider);
m4.write(slider);
}