#define BLYNK_TEMPLATE_ID "TMPL393wq1Cro"
#define BLYNK_TEMPLATE_NAME "air watch"
#define BLYNK_AUTH_TOKEN "RQlDyCOjnFTrOQB57Q9Dnra5QTu_d03b"
// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial
/*
#define BLYNK_TEMPLATE_ID "TMPL33izlgtw1"
#define BLYNK_TEMPLATE_NAME "my temp"
#define BLYNK_AUTH_TOKEN "g9SvnZAOXLljXq1L6KEdoY3wjDzi8LgS"
*/
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char auth[] = BLYNK_AUTH_TOKEN;
char ssid[] = "Wokwi-GUEST";
char pass[] = "";
// This function will be called every time Slider Widget
// in Blynk app writes values to the Virtual Pin V1
BLYNK_WRITE(V1)
{
if(param.asInt()==1){
digitalWrite(25, HIGH);
}
else{
digitalWrite(25, LOW);
} // assigning incoming value from pin V1 to a variable
// process received value
}
void setup()
{
// Debug console
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
pinMode(25, OUTPUT);
// 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();
}