#define BLYNK_TEMPLATE_ID "TMPL6pa6NnJjs"
#define BLYNK_TEMPLATE_NAME "ExamAFS"
#define BLYNK_AUTH_TOKEN "xLyF2e3iVQja_xEuLGLsE1e_zhMcUhmh”
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char ssid[] = "wokwi-GUEST";
char pass[] = "";
BLYNK_WRITE(V1)
{
int sw = param.asInt();
Serial.println(sw);
if(sw==1){
digitalWrite(2, HIGH);
}else
digitalWrite(2, LOW);
}
BLYNK_CONNECTED()
{
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
pinMode(2, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10);
Blynk.run();
digitalWrite(2, HIGH);
// this speeds up the simulation
}