IoTBeginner 2 hours
Smart Home LED Control
Build a Bluetooth-controlled lighting system. Pair your phone with an HC-05 module and toggle LEDs from anywhere in the room. A perfect intro to wireless IoT.
Required components
- Arduino UNO
- HC-05 Bluetooth Module
- LEDs (3)
- 220Ω Resistors
- Breadboard
- Jumper Wires
Circuit diagram
Arduino UNO sits at the center. HC-05 connects to digital pins 10 and 11 for serial communication. Three LEDs branch out to pins 6, 7, 8 — each through a 220Ω current-limiting resistor to ground.
Interactive 3D circuit viewer coming in the Virtual Lab.
Step-by-step guide
- 1
Place Arduino and breadboard side by side.
- 2
Connect HC-05: VCC→5V, GND→GND, TX→Pin 10, RX→Pin 11.
- 3
Wire 3 LEDs to pins 6, 7, 8 through 220Ω resistors to GND.
- 4
Upload the sketch and pair your phone with the HC-05.
- 5
Send 'A'/'a' to toggle LED 1, 'B'/'b' for LED 2, 'C'/'c' for LED 3.
Code
#include <SoftwareSerial.h>
SoftwareSerial BT(10, 11); // RX, TX
void setup() {
BT.begin(9600);
for (int p = 6; p <= 8; p++) pinMode(p, OUTPUT);
}
void loop() {
if (BT.available()) {
char c = BT.read();
if (c == 'A') digitalWrite(6, HIGH);
if (c == 'a') digitalWrite(6, LOW);
if (c == 'B') digitalWrite(7, HIGH);
if (c == 'b') digitalWrite(7, LOW);
if (c == 'C') digitalWrite(8, HIGH);
if (c == 'c') digitalWrite(8, LOW);
}
}Need help?
Stuck on a step?
Ask the Botix AI Tutor — it knows this project end-to-end.