#define BLYNK_TEMPLATE_ID "TMPL3g-wLhMXd"
#define BLYNK_TEMPLATE_NAME "abb"
#define BLYNK_AUTH_TOKEN "6gZLOHRpNCkc4qQAL97QOKD4FNmsUfKa"
#define BLYNK_PRINT Serial
#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[] = "";
BLYNK_WRITE(V0)
{
int pinValue = param.asInt();
if (pinValue == 1)
{
digitalWrite(4, HIGH);
}
else {
digitalWrite(4, LOW);
}
}
void setup()
{
// Debug console
Serial.begin(115200);
pinMode(4, OUTPUT);
Blynk.begin(auth, ssid, pass);
}
void loop()
{
Blynk.run();
}