Arduino HC-05 (Bluetooth) Interfacing

In this post we will access Arduino over Bluetooth either through ur PC or Android device.
This will be useful in case when you have sensors interfaced to ur arduino board and want to send this information to ur Mobile.

Things needed to do this experiment:

1. Arduino Uno

2. HC-05


Connections:



1.Connect TX of HC-05 to TX of Arduino
2.Connect RX of HC-05 to RX of Arduino
3.Connect GND of HC-05 to GND of Arduino
4.Connect VCC of HC-05 to 5V of Arduino

Power up the device either by connecting USB or a battery.

Now you can scan this on your PC or Android device to see whether your device is listed out.

For example in Ubuntu I can run hcitool scan and it lists out all the Bluetooth devices.

Now you can see a device with name HC-05 in the list.

This means your HC-05 is working properly.

You can also check the same on your Android device.

Now you have to pair your Ubuntu Bluetooth with HC-05. In order to achieve this:

1.Go to Bluetooth Icon, and click on "Setup a New Device"

2. Click "Continue" which will search for the devices. Select HC-05.

3. Click on "PIN Options" and then Select "1234" and Click "Continue" . Now HC-05 is paired with your Ubuntu Machine.

Similarly the same thing you can do on your android device and while pairing the PIN is "1234".

Now we will make a communication in between Android and HC-05

Download Bluetooth Terminal App on your mobile:

https://play.google.com/store/apps/details?id=Qwerty.BluetoothTerminal

From the app, you can connect to the device.

Coming to Arduino: upload an empty sketch

HC-05   Arduino

RX        RX
TX        TX
VCC     5V
GND    GND

Now open the Serial Board from Arduino IDE. Now you can type from Arduino you will receive it on the Android Bluetooth Terminal screen and vice versa



Note: BAUD RATE should be set to 38400


Comments

Popular posts from this blog

bb.utils.contains yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig

PR, PN and PV Variable in Yocto