This tutorial of Robo India explains how to send and receive the data on Bluetooth terminal(Android) using Arduino.
1. Introduction:
This tutorial explains how to send and receive the data on bluetooth devices using HC-10 bluetooth module.
![](https://roboindia.com/wp/wp-content/uploads/2019/05/3-8.png)
2. Requirement:
2.1 Hardware and Software Required:
- HM-10 Bluetooth Module
- Arduino Uno
- Arduino IDE 1.6.2
Users can buy this device online from Robo India Shop: https://roboindia.com/store/bluetooth-hm10
3.How to connect HM-10 bluetooth module with Arduino Uno
- VCC to 3.3V or 5V
- GND to GND
- TX to digital pin 8
- RX to digital pin 9
![](https://roboindia.com/wp/wp-content/uploads/2019/05/4-22.jpg)
4. Program for HM-10 Bluetooth Module
Connect the module to Arduino Uno and upload the program given below
You may download this code (Arduino Code) from here.
#include <SoftwareSerial.h> SoftwareSerial mySerial(8,9); void setup() { mySerial.begin(9600); Serial.begin(9600); delay(100); } void loop() { if (Serial.available()>0) mySerial.write(Serial.read()); if (mySerial.available()>0) Serial.write(mySerial.read()); }
Note:If the user want to access the HM-10 module using AT commands,upload the above code and open the serial monitor.Type the AT commands in serial monitor.For example,type AT,you will get a response OK.
5.Application on Phone:
The user download this android application called BLE Scanner
1.Download the BLE Scanner in your android phone
2. Pair your phone with MLT-BT05. for doing this go to Settings->Bluetooth->Scan device->select MLT-BT05 and pair it. Pass code to pair is ‘123456789’.
3. Than open the application in your mobile.Scan and connect the bluetooth module.
![](https://roboindia.com/wp/wp-content/uploads/2019/05/6-12-576x1024.png)
4. After the module has been connected,three lists will be shown.The user need to open the custom service.
![](https://roboindia.com/wp/wp-content/uploads/2019/05/7-12-576x1024.png)
5. The custom service has three icons which are R for Read,W for Write and N for Notify.
![](https://roboindia.com/wp/wp-content/uploads/2019/05/8-8-576x1024.png)
6. Now open the serial monitor and type the text which you want to send.Press N icon in the app to view the text sent via serial monitor.
![](https://roboindia.com/wp/wp-content/uploads/2019/05/9-7-1024x692.png)
7. To send data via the app,the user need to press the W icon.Type the text and send.The text will be displayed in the serial monitor.
![](https://roboindia.com/wp/wp-content/uploads/2019/05/11-3-1024x659.png)
If you have any query please write us at info@roboindia.com
Thanks and Regards
Content Development Team
Robo India
https://roboindia.com