Aim
To control an LED or fan from a smartphone app using IoT.
Requirements
- Hardware / Simulation Tools:
- Arduino Uno
- Wi-Fi Module (ESP8266 or ESP32)
- LED / Small fan motor
- Jumper wires, breadboard
- Smartphone with Blynk app or online IoT dashboard
Steps
Step 1: Build the Circuit
- Connect LED or Fan to Arduino:
- LED → Digital Pin (D9), resistor in series
- Fan → Motor driver or transistor with digital pin
- Connect Wi-Fi Module (ESP8266) to Arduino:
- VCC → 3.3V
- GND → GND
- TX → RX, RX → TX
Step 2: Prepare the Mobile App (Blynk)
- Download and install Blynk app on your phone.
- Create a new project: Select “Arduino Uno” + Wi-Fi (ESP8266).
- Add a Button widget on the dashboard.
- Set button to Digital Pin D9.
Step 3: Connect Arduino to Blynk
- In the Arduino IDE, write code that connects to your Wi-Fi and links with the Blynk server.
- Upload the program.
Step 4: Test Remote Control
- Open the app and press the button.
- The LED/fan should turn ON.
- Press again, and it should turn OFF.
Step 5: Extend the Idea
- Try adding two buttons (one for LED, one for Fan).
- Add Timer widget to switch OFF automatically after a certain time.
- Discuss: What would happen if internet connection breaks?