#define BLYNK_TEMPLATE_ID "TMPL6f6PfI4Dw"
#define BLYNK_TEMPLATE_NAME "test projact"
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char auth[] = "n9p6NOfvQB8UqK-j_9fFN01i74dSL5Lx";
char ssid[] = "Wokwi-GUEST";
char pass[] = "";
int pinLED = 2; //
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
pinMode(pinLED, OUTPUT);
}
void loop()
{
Blynk.run();
}
BLYNK_WRITE(V1)
{
int ledState = param.asInt();
if (ledState == 1) {
digitalWrite(pinLED, HIGH);
} else {
digitalWrite(pinLED, LOW);
}
}