IOT based Home Automation

Circuit Diagram:-

IOT home automation circuit

Souce Code :-

#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = "   "; //auth code sent on mail id

char ssid[] = "   "; //Mobile hotspot name
char pass[] = "   "; //Mobile Hotspot Password

void setup()
{
  // Debug console
  Serial.begin(9600);
  pinMode(D1,OUTPUT);
  pinMode(D2,OUTPUT);
  pinMode(D3,OUTPUT);
  pinMode(D4,OUTPUT);

  digitalWrite(D1,HIGH);
  digitalWrite(D2,HIGH);
  digitalWrite(D3,HIGH);
  digitalWrite(D4,HIGH);
  
  

  Blynk.begin(auth, ssid, pass);
  
}

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

Leave a Comment