#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID "TMPL4B07REFq-"
#define BLYNK_TEMPLATE_NAME "servo"
#define BLYNK_AUTH_TOKEN "vQnEdtnsisWQUhWd-LXpcKupoc_C4jS6"
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include <ESP32Servo.h>
char auth[] = BLYNK_AUTH_TOKEN;
char ssid[] = "Wokwi-GUEST";
char pass[] = "";
BlynkTimer timer;
int SW_State_M = 0;
#define ServoPin (14)
#define ADC analogRead(vrPin)
Servo myServo;
void setup() {
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
myServo.attach(ServoPin);
// configure the trigger pin to output mode
}
BLYNK_WRITE (V0)
{
SW_State_M = param.asInt();
myServo.write(SW_State_M);
}
void loop() {
Blynk.run();
timer.run();
}