In this tutorial, we are going to make IoT Home Automation System using Blynk NodeMCU ESP8266
Introduction
The term "home automation" refers to a system that automates the control of household equipment. We can now control household appliances from anywhere on the globe using a mobile device, a laptop, or the internet. All of these types of systems are growing more popular since they give versatile functionality which can be readily configured by anybody according to their needs, hence why all IoT systems are getting more popular.
In this electronic project, we are going to make an "IoT Home Automation System" using Blynk App and NodeMCU ESP8266 Microcontroller.
PCBWay commits to meeting the needs of its customers from different industries in terms of quality, delivery, cost-effectiveness, and any other demanding requests. As one of the most experienced PCB manufacturers in China. They pride themselves to be your best business partners as well as good friends in every aspect of your PCB needs.
Home Automation Circuit
ESP8266 Code
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "Sz5eLNB-rcd9w43wBRMYkhI28eu4ASEY"; // Enter your Auth Token
char ssid[] = "Circuits DIY"; // Enter your WIFI name
char pass[] = "03433212601"; // Enter your WIFI password
//Get the button value
BLYNK_WRITE(V0) {
digitalWrite(D0, param.asInt()); // Relay 1
}
BLYNK_WRITE(V1) {
digitalWrite(D1, param.asInt()); // Relay 2
}
BLYNK_WRITE(V2) {
digitalWrite(D2, param.asInt()); // Relay 3
}
BLYNK_WRITE(V3) {
digitalWrite(D3, param.asInt()); // Relay 4
}
void setup() {
//Set the Relay pins as an output
pinMode(D0, OUTPUT); // Relay 1
pinMode(D1, OUTPUT); // Relay 2
pinMode(D2, OUTPUT); // Relay 3
pinMode(D3, OUTPUT); // Relay 4
//Initialize the Blynk library
Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
}
void loop() {
//Run the Blynk library
Blynk.run();
}