IOT Based RGB Lamp Using Nodemcu(ESP8266)

by Gaurav Rathi in Circuits > Wireless

919 Views, 6 Favorites, 0 Comments

IOT Based RGB Lamp Using Nodemcu(ESP8266)

RGBLAMP.jpg

HEY GUYS IN THIS TUTORIAL WE WILL MAKE AN IOT BASED RGB LAMP USING NODEMCU(ESP8266)

THIS PROJECT WILL USE THE BLYNK APP FOR CONTROLLING THE LAMP.

Supplies

NODEMCU

RGB LED

USB CABLE

Setting Up Blynk App

WhatsApp Image 2021-02-06 at 4.00.05 PM (6).jpeg
WhatsApp Image 2021-02-06 at 4.00.05 PM (3).jpeg
WhatsApp Image 2021-02-06 at 4.00.05 PM (5).jpeg
WhatsApp Image 2021-02-06 at 4.00.05 PM (4).jpeg
WhatsApp Image 2021-02-06 at 4.00.05 PM (2).jpeg
WhatsApp Image 2021-02-06 at 4.00.05 PM.jpeg
WhatsApp Image 2021-02-06 at 4.00.05 PM (1).jpeg

open up the Blynk app and click on new project then select the board type as nodemcu and then an auth token will be sent to your email, and then select the widget ZERGBA AND THE SELECT R PIN AS D0, G PIN AS D1,AND B PIN AS D2 .

Programming Nodemcu

WhatsApp Image 2021-02-06 at 3.54.18 PM.jpeg
WhatsApp Image 2021-02-06 at 3.54.54 PM.jpeg

Now open Arduino ide and edit the code by typing your WIFI/hotspot SSID, Password and enter your Blynk token your Blynk token will be sent by Blynk to your registered email id, and now upload the code.

code -

#define BLYNK_PRINT Serial

#include #include

// You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "YourAuthToken";

// Your WiFi credentials. // Set password to "" for open networks. char ssid[] = "YourNetworkName"; char pass[] = "YourPassword";

void setup() { // Debug console Serial.begin(9600);

Blynk.begin(auth, ssid, pass); // You can also specify server: //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80); //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080); }

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

Downloads

Wiring

WhatsApp Image 2021-02-06 at 4.02.52 PM.jpeg

now make the connection as follows -

led's R pin to D0 of Nodemcu

led's G pin to D1 of Nodemcu

led's B pin to D2 of Nodemcu

led's GND pin to GND of Nodemcu

ALL DONE!!

WhatsApp Image 2021-02-06 at 4.00.05 PM (1).jpeg
WhatsApp Image 2021-02-06 at 4.02.52 PM.jpeg

NOW YOU CAN CONTROL YOUR RGB LAMP FROM ANY PART OF THE WORLD!!

IF YOU LIKE MY PROJECT PLEASE VOTE ME!