Smart Android Bluetooth-Controlled LED System

Smart Android Bluetooth-Controlled LED System

·

3 min read

Ever wondered how you can control lights using your phone? In this fun and simple project, we’ll show you how to use an Arduino microcontroller to control LEDs wirelessly via Bluetooth!

Our project is a light system with three LEDs: Red, Yellow, and Green. By using a mobile app, we can send commands to turn them ON or OFF at any time. This is a great way to learn how to use Bluetooth, Arduino, and basic electronics for smart home automation in an exciting hands-on way!

What You Need

To build this, you'll need the following components:

Arduino Board – The brain of the system.
Bluetooth Module (HC-05) – To communicate with your phone.
Three LEDs – Red, Yellow, and Green.
Three 220-ohm Resistors – To protect the LEDs.
Breadboard & Jumper Wires – For easy connections.
Power Supply – USB or battery pack.
Mobile App – Any app that can send Bluetooth commands. (Arduino BlueControl Application)


Wiring Connections

Connecting the LEDs:
🔴 Red LED → Pin 9 on Arduino
🟡 Yellow LED → Pin 10 on Arduino
🟢 Green LED → Pin 11 on Arduino
Each LED’s negative leg connects to GND through a 220-ohm resistor.

Connecting the Bluetooth Module (HC-05):
- VCC5V on Arduino
- GNDGND on Arduino
- TXDRX (Pin 0) on Arduino
- RXDTX (Pin 1) on Arduino

How It Works

1️⃣ Upload the Arduino code to your board.
2️⃣ Connect the Bluetooth module to the Arduino.
3️⃣ Pair your phone with the HC-05 Bluetooth module.
4️⃣ Open a Bluetooth terminal app on your phone.
5️⃣ Send ‘1’ to turn the Red LED ON/OFF.
6️⃣ Send ‘2’ to turn the Yellow LED ON/OFF.
7️⃣ Send ‘3’ to turn the Green LED ON/OFF.
8️⃣ Send ‘4’ to run a traffic light sequence.

Arduino Code

char data = 0;
int redLed = 9;
int yellowLed = 10;
int greenLed = 11;
bool redLedState = LOW;
bool yellowLedState = LOW;
bool greenLedState = LOW;

void setup() {
    Serial.begin(9600);
    pinMode(redLed, OUTPUT);
    pinMode(yellowLed, OUTPUT);
    pinMode(greenLed, OUTPUT);
    digitalWrite(redLed, redLedState);
    digitalWrite(yellowLed, yellowLedState);
    digitalWrite(greenLed, greenLedState);
}

void loop() {
    if (Serial.available() > 0) {
        data = Serial.read();
        switch(data) {
            case '1':
                redLedState = !redLedState;
                digitalWrite(redLed, redLedState);
                break;
            case '2':
                yellowLedState = !yellowLedState;
                digitalWrite(yellowLed, yellowLedState);
                break;
            case '3':
                greenLedState = !greenLedState;
                digitalWrite(greenLed, greenLedState);
                break;
            case '4':
                runLedSequence();
                break;
            default:
                break;
        }
    }
}

void runLedSequence() {
    digitalWrite(redLed, HIGH);
    delay(1000);
    digitalWrite(redLed, LOW);
    delay(500);

    digitalWrite(yellowLed, HIGH);
    delay(1000);
    digitalWrite(yellowLed, LOW);
    delay(500);

    digitalWrite(greenLed, HIGH);
    delay(1000);
    digitalWrite(greenLed, LOW);
    delay(500);
}

Summary

✅ This project teaches how to control LEDs using Bluetooth and Arduino.
✅ The traffic light system uses Red, Yellow, and Green LEDs.
✅ You can control each LED separately or run a traffic light sequence.
✅ It’s a great beginner project to learn Arduino, Bluetooth communication, and basic electronics!

Now, try it yourself and light up your world with Arduino!