WiFi LED Switch IoT

The main aim of this project is to come up with a functional WiFi switch that will help us operate via the “Blynk” app from the Mobile app store.

This Instructable is successfully tested with very basic knowledge of Electronics and I would appreciate suggestions from professionals in the domain to comment for appropriate changes.


The following components are required to successfully complete the project

  1. NodeMCU
  2. White LEDs – 10 Nos
  3. Multimeter
  4. Soldering Iron
  5. Soldering Lead
  6. Soldering Flux

Step 1: WiFi LED Switch Using NodeMCU & Blynk

The very first step is to check and lineup LEDs in accordance with their polarity (Anode & Cathode lined up for easy identification)

There may be a few LEDs that may nor be functional, hence it is always suggested to check each one of the LEDs using Multimeter.

Step 2: Identifying & Soldering Working LEDs

Continuity check using Multimeter will help us identify the functional LEDs and the faulty ones.

It is always better to tape the LEDs WRT their polarity and make them ready to be soldered.

On completion of soldering all 10 LEDs, it is once again suggested to check the continuity using a multimeter.

LED is functional only if the positive lead of the multimeter when connected to the Anode and the negative lead of the multimer to the Cathode helps the LED mildly glow.

On completion of soldering all LEDs, we can primarily check if all the LEDs are glowing with help of a 9V Battery (Connections to be made keeping Polarity in mind)

Note: If there is a failure LED, you may see something similar to one of the images uploaded where the Multimeter displays a value of 1607.

Step 3: Connecting NodeMCU & Uploading the Code Via Arduino IDE.

Packaging the prototype is important and I found a “Solid State Drive (SSD)” packaging tray to be most appropriate to package the soldered LEDs and NodeMCU.

The connections are very simple and are as follows:

1. Connect “D1” pin of NodeMCU to the Anode of soldered LEDs and

2. Connect the “GND” pin of NodeMCU to the Cathode of soldered LEDs.

Note: Please refer to the attached screenshot for the complete code. It seems some portion of code is missing, especially with the “include” statements while placing the subsequent text in between less than and greater than symbols.

Upload the following code to NodeMCU:

#define BLYNK_PRINT Serial

#include ESP8266WiFi.h

#include BlynkSimpleEsp8266.h

char auth[] = “**************************************************”;

// Your WiFi credentials.

// Set password to “” for open networks.

char ssid[] = “************”;

char pass[] = “*****************************”;

void setup()

// Debug console


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()



Step 4: Blynk – Configuration & Testing.

Finally, it is time to configure and test the prototype functionality using the mobile application “Blynk”.

Please take the necessary help from the attached screenshots to complete and run the prototype successfully.

The following step by step instructions will help the reader of this article:

  1. Install and open the Blynk App on mobile.
  2. Give the project a name: “WiFi LED Switch IoT” in this case. You may choose your own terminology to name it.
  3. From the drop-down list, choose the device using which the experiment is completed.
  4. On selecting “Create”, an “Authorization Token” is shared with the registered/configured Email ID.
  5. It is now time to add components to the project. We will need only one “Button” in this case.
  6. Furthermore, the button “Output” setting needs to be changed to indicate the Digital pin on which the LED in series is connected (D1 in this case).
  7. Continue to configure mode to “Switch” to complete the configuration.
  8. Choose a convenient location for the “Button” to be placed on the dashboard and select the “Play” button at the top right corner of the interface to start interacting with the board.
  9. You should now be able to control your LEDs in series from anywhere & any time.

In case of any further help, you may WhatsApp me on +91 9398472594.

Source: WiFi LED Switch IoT

About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top