Home Automation Extension Box | 2 way Switch and Smartphone | ESP8266
https://www.flyrobo.in/nodemcu_esp8266_wifi_development_board?tracking=5c723900abvrl
Relay Module:- https://www.flyrobo.in/5v_four_channel_relay_module?tracking=5c723900abvrl
Jumpers:- https://www.flyrobo.in/combo-of-3-type-jumper-cables-f-f-f-m-m-m?tracking=5c723900abvrl
Breadboard:- https://www.flyrobo.in/high_quality_solderless_breadboard_with_430_tie_point_for_arduino?tracking=5c723900abvrl
3 pin Socket
Switch 2 Way
Switch Board
Wire
3 pin Plug

/*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
*************************************************************/
#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();
}

Comments
Post a Comment