Skip to content

This project uses an ESP8266 to control 5 LEDs via the Blynk app over Wi-Fi. Each LED is mapped to a separate digital pin (D0-D4), allowing individual control. The ESP8266 receives commands from the app and toggles the corresponding LED.

License

Notifications You must be signed in to change notification settings

navalepratham18/Iot-Club-Lamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ ESP8266 Blynk-Controlled LED Project πŸ’‘

This project allows you to control 5 LEDs using the ESP8266 via the Blynk app over Wi-Fi. Each LED is mapped to a separate button in the Blynk app, enabling individual control. πŸŽ›οΈ

1️⃣ Setting Up the Blynk App

πŸ“² Step 1: Download Blynk

πŸ†• Step 2: Create a New Project

  1. Open the Blynk app and sign up/log in.
  2. Click βž• New Project.
  3. Enter the Project Name (e.g., "ESP8266 LED Control").
  4. Select πŸ“‘ Device β†’ Choose ESP8266.
  5. Choose πŸ”— Connection Type β†’ Set to Wi-Fi.
  6. Tap βœ… Create β†’ You will receive an Auth Token via email. πŸ“§

πŸŽ›οΈ Step 3: Add Buttons for LEDs

  1. Inside the project, tap the βž• β€œ+” icon to add widgets.
  2. Select πŸ”˜ Button and place it on the screen.
  3. Tap the button, set:
    • πŸ“ Name: LED 1
    • πŸ“ Pin: V0
    • πŸ”„ Mode: Switch
  4. Repeat this for LED 2, LED 3, LED 4, and LED 5 using V1, V2, V3, and V4.
  5. Click πŸ’Ύ Save and exit the editor.

2️⃣ Setting Up the ESP8266 Code

πŸ“¦ Step 1: Install Required Libraries

Ensure you have the following Arduino libraries installed:

  • πŸ“‚ Blynk (Download)
  • πŸ“‚ ESP8266WiFi

πŸ“‘ Step 2: Enter Wi-Fi and Auth Token

Modify the following code snippet in your Arduino IDE:

#define BLYNK_AUTH_TOKEN "YOUR_BLYNK_AUTH_TOKEN" // πŸ”‘ Enter Blynk Auth Token
char ssid[] = "YOUR_WIFI_SSID"; // πŸ“Ά Enter Wi-Fi Name
char pass[] = "YOUR_WIFI_PASSWORD"; // πŸ” Enter Wi-Fi Password

πŸ”„ Step 3: Upload the Code to ESP8266

  1. πŸ”Œ Connect ESP8266 to PC via USB.
  2. πŸ–₯️ Open the Arduino IDE.
  3. πŸ”§ Select Board: "NodeMCU 1.0 (ESP-12E Module)".
  4. βš™οΈ Select Port (COMx).
  5. πŸ“€ Click Upload and wait for completion.

πŸ“² Step 4: Run the Blynk App

  1. ⚑ Power the ESP8266.
  2. πŸ“± Open the Blynk app and start the project.
  3. πŸ•ΉοΈ Press buttons in the app to control LEDs!

3️⃣ Circuit Connections

Each LED is connected through a 220Ω resistor to prevent excess current. ⚑

πŸ’‘ LED πŸ–₯️ ESP8266 Pin πŸ”˜ Virtual Pin
LED 1 D0 V0
LED 2 D1 V1
LED 3 D2 V2
LED 4 D3 V3
LED 5 D4 V4

πŸ”Œ Connections:

  • πŸ”΄ LED Anode (+) β†’ ESP8266 GPIO pin (D0 - D4) through a 220Ξ© resistor.
  • ⚫ LED Cathode (-) β†’ ESP8266 GND.

4️⃣ Powering the ESP8266

  • βœ… Preferred: USB power or 5V adapter.
  • ⚠️ If using a 9V battery: Use a 7805 voltage regulator to step down to 5V.

5️⃣ Expected Output

βœ… Press Button V0 β†’ πŸ’‘ LED 1 Turns ON. Press again β†’ LED 1 Turns OFF.
βœ… Press Button V1 β†’ πŸ’‘ LED 2 Turns ON. Press again β†’ LED 2 Turns OFF.
βœ… Repeat for LEDs V2, V3, V4.


πŸŽ‰ Now, you can control your LEDs wirelessly using ESP8266 & Blynk! πŸš€πŸ’‘

About

This project uses an ESP8266 to control 5 LEDs via the Blynk app over Wi-Fi. Each LED is mapped to a separate digital pin (D0-D4), allowing individual control. The ESP8266 receives commands from the app and toggles the corresponding LED.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages