#define BLYNK_TEMPLATE_ID "TMPLJnsI2QSI"
#define BLYNK_DEVICE_NAME "SLIDER"
#define BLYNK_AUTH_TOKEN "dRJ9L7Lo4eP1fuo2LpmXm5zrAreVVPQE"
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char auth[] = BLYNK_AUTH_TOKEN;
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Wokwi-GUEST";
char pass[] = "";
int value;
// This function will be called every time Slider Widget
// in Blynk app writes values to the Virtual Pin V4
BLYNK_WRITE(V4)
{
value = param.asInt(); // Get value as integer
}
void setup()
{
// Debug console
Serial.begin(115200);
pinMode(27,OUTPUT);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}
void loop()
{
Blynk.run();
digitalWrite(27, HIGH);
delay(value);
digitalWrite(27, LOW);
delay(value);
}