Control Relays with Blynk

 

/* :::: CODE :::: */
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

char auth[] = “your_Auth_Token_from_blynk”;
char ssid[] = “your_ssid”;
char pass[] = “your_password”;

void setup() {

Serial.begin(115200);
delay(10);
Serial.print(“Connecting to “);
Serial.println(ssid);

WiFi.begin(ssid, pass);
int wifi_ctr = 0;
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(“.”);
}

Serial.println(“WiFi connected”);
Blynk.begin(auth, ssid, pass);

}

void loop(){
Blynk.run();
}

/* :::: END :::: */