DIY Inventor
Published

Arduino Uno HC-05 Bluetooth Controlled LED using Mobile

This project is going to tell you How to make a HC-05 Bluetooth Controlled LED using LED with help of Mobile. A smart Home Project

BeginnerFull instructions provided14,123
Arduino Uno HC-05 Bluetooth Controlled LED using Mobile

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
5 mm LED: Red
5 mm LED: Red
×1
LED, Blue
LED, Blue
×1
5 mm LED: Green
5 mm LED: Green
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Bluetooth Electronics

Story

Read more

Schematics

Circuit Diagram

Connection of HC-05

Hook the GND pin (Negative Pin) of HC-05 to Pin GND of Arduino.
Connect Red VCC Pin (Positive Pin) of HC-05 to VCC of Arduino.
Connect TX pin (Data Transfer Pin) of HC-05 to RX pin of Arduino.
Connect RX Pin of HC-05 to TX Pin of Arduino.
Connection of LED

Hook the GND Pin (Negative Pin) of all led to Pin GND of Arduino.
Connect VCC Pin (Positive Pin) of Red LED to Pin 3 of Arduino.
Connect VCC Pin (Positive Pin) of Blue LED to Pin 4 of Arduino.
Connect VCC Pin (Positive Pin) of Green LED to Pin 5 of Arduino.

Code

Code

C/C++
 void setup() {
Serial.begin(9600);
 pinMode(3, OUTPUT); // put your setup code here, to run once:
 pinMode(4, OUTPUT);
 pinMode(5, OUTPUT);
 }

void loop() {
  // put your main code here, to run repeatedly:
 if(Serial.available()>0)
   {     
      char data= Serial.read(); // reading the data received from the bluetooth module
      switch(data)
      {
        case '1': digitalWrite(3, HIGH);break; 
        case '2': digitalWrite(4, HIGH);break;         
        case '3': digitalWrite(5, HIGH);break;

        case '4': digitalWrite(3, LOW);break; 
        case '5': digitalWrite(4, LOW);break;         
        case '6': digitalWrite(5, LOW);break;
        
        default : break;
      }
      Serial.println(data);
   }
   delay(50);
}

Credits

DIY Inventor

DIY Inventor

0 projects • 15 followers
Hello Guys, My name is Krishna Agarwal , and I'm passionate about Making DIY Projects. Here I make Arduino and Robotics related projects.

Comments