Introduction: Bluetooth Voice Control LED

About: Hello World, I'm Ohm Awasthi, I'm a 16-year-old high school student, I have a keen interest in making projects from Arduino.

Hello world, I'm making a new project after a long time.

So, In this instructable, we are going to make Voice Control LED with Bluetooth. This project is very simple.

Firstly, please subscribe to my channel OHM'S LAB

So, Let's Start:

Step 1: & YOU WILL NEED!

SO, to make this project you will need -

Hardware:

1) Arduino UNO

2)HC-05 BLUETOOTH MODULE

3) 3 LEDs ( because I will control 3 LEDs)

Software:

1) ARDUINO IDE

2)Arduino Bluetooth Control

Step 2: Connections:

The schematic is very simple. All you have to do is that:

1)Connect Rx of HC-05 to TX of Arduino UNO.

2)Connect TX of HC-05 to RX of Arduino UNO.

3) Connect 3 led's +ve terminal to 13,12,11(Digital pins) respectively.

4) Connect all 3 led's -ve to GND of Rduino.

Step 3: Sketch

The code is very very simple.

#include
int led1 = 8;

int led2 = 9;

int led3 = 10;

int led4 = 11;//change led position accordingly

int value = 0;//initial serial read value

void setup()

{ Serial.begin(9600);//this is important. the baud rate between arduino bluetooth and smartphone

pinMode(led1, OUTPUT);

pinMode(led2, OUTPUT);

pinMode(led3, OUTPUT);

pinMode(led4, OUTPUT);

}

void loop()

{

while(Serial.available())

{//if serial reading is available

delay(1000);//delay for a second, avoid overloading

value = Serial.read(); //value = serial value(led value)

Serial.print(value);//print the serial value

Serial.println();

if (value == 1)//

{

digitalWrite(led1,HIGH);

digitalWrite(led2,LOW);

digitalWrite(led3,LOW);

digitalWrite(led4,LOW);

}

if (value == 2)

{

digitalWrite(led1,HIGH);

digitalWrite(led2,HIGH);

digitalWrite(led3,LOW);

digitalWrite(led4,LOW);

}

if (value == 3)

{

digitalWrite(led1,HIGH);

digitalWrite(led2,HIGH);

digitalWrite(led3,HIGH);

digitalWrite(led4,LOW);

}

if (value == 4)

{

digitalWrite(led1,HIGH);

digitalWrite(led2,HIGH);

digitalWrite(led3,HIGH);

digitalWrite(led4,HIGH);

}

}

}

Step 4: Application

The application I use is Arduino Bluetooth control which you can download by play store.

So, after connecting to the HC05, You have to do the following steps:

1)Go to the settings of the app.

2)Go to voice control.

Set the voice sentence & sending an integer according to the code.

For Example=

In the sketch, I have written that If the value is 1 then turn on leds.

In-app you can write any vocal command like"TURN ON LED" & sending command to 1.

Step 5: CONCLUSION

Thanks for reading this instructable. & consider supporting my channel Ohm's Lab.

If you have any problem you can ask in the comments!

#################################THANKS FOR READING####################################