In this instructables i am going to show how to get started with connection between Arduino and smart phone using bluetooth module. All connection setups and output for this project shown in above video and codes need for this project will be given below steps.
Step 1: Circuit Connection
Circuit connection of this project is simple
Arduino UNO -------- Bluetooth module
3.3 v pin ----------------- VCC pin
Gnd pin ----------------- Gnd pin
Tx pin --------------------- RXD pin
Rx pin --------------------- TXD pin
That's all connection between Arduino UNO and bluetooth module is finished.
For test purpose we are adding led in circuit.
Connect led positive pin to Arduino pin 13 and connect led negative pin to Arduino Gnd pin through 100 ohm resistor
Step 2: Control Led Using Smart Phone
In this step we are going to control the led which is connected with Arduino UNO from smartphone via HC-05 bluetooth module.
For that first we need to upload the below code
To Arduino. While uploading the code disconnect HC-05 bluetooth module from Arduino like shown in video.
int led = 13;
String value = Serial.readStringUntil('\n');
if(value == "on")
else if(value == "off")
After upload the code, download and install the app given below play store link in your smartphone :
After installation turn on smartphone bluetooth and detect the HC -05 bluetooth module and
Pair it with your smartphone (The pairing password for HC-05 module is mostly 1234).
After pairing, open the app and select the paired
HC-05 bluetooth module. Then type "on" and click send button then led will turn on. Same as type "off" and click send button then led will turn off.
We can use any comment we want instead of "on" and "off" by changing the Arduino code
Also we can control anything we want instead of the led by changing the Arduino code
See the complete project output in action in above video.
Thanks for reading.
Enjoy the project.