2WAY LIGHT CONTROL USING BLYNK AND NODEMCU
VIDEO:
VIDEO LINK : https://youtu.be/3cafRxcZkrU
MATERIALS REQUIRED:
1.NODEMCU
2.5V RELAY MODULE
3.2WAY SWITCH
4.AC BULB AND PLUG
5.JUMPER CABLES
CODE:
// CREATIVE PRADEEP//
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "---------------"; //You will get this Auth Token in Gmail if you signin Blynk app with your Gmail ID
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "------"; //Enter your WIFI Name
char pass[] = "------";//Enter your WIFI Password
void setup()
{
// Debug console
Serial.begin(9600);
pinMode(D0,OUTPUT);
pinMode(D1,OUTPUT);
pinMode(D2,OUTPUT);
pinMode(D3,OUTPUT);
digitalWrite(D0,HIGH);
digitalWrite(D1,HIGH);
digitalWrite(D2,HIGH);
digitalWrite(D3,HIGH);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
}
void loop()
{
Blynk.run();
}
CIRCUIT DIAGRAM:
CHANNEL LINK: https://youtube.com/c/CreativePradeep
Comments
Post a Comment