Interfacing Bluetooth module (e.g. HC05)- receiving data from mobile phone on Arduino and display on LCD.

Computer Programming  and Technology.
By -
0

Aim:

To interface an HC-05 Bluetooth module with Arduino, receive data from a mobile phone, and display the received data on a 16×2 LCD.

Components Required:

  • Arduino UNO
  • HC-05 Bluetooth Module
  • 16×2 LCD with I2C module
  • Jumper wires
  • USB cable
  • Android mobile phone

Connections:

HC-05Arduino UNO
VCC5V
GNDGND
TXDD10
RXDD11

I2C LCD:

LCDArduino UNO
VCC5V
GNDGND
SDAA4
SCLA5

Arduino Program

#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
SoftwareSerial BT(10, 11); // RX, TX
void setup()
{
Serial.begin(9600);
BT.begin(9600);
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Waiting...");
}
void loop()
{
if (BT.available())
{
String data = BT.readStringUntil('\n');
data.trim();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Bluetooth Data:");
lcd.setCursor(0, 1);
lcd.print(data);
Serial.println(data);
}
}

Procedure

  1. Connect the HC-05 Bluetooth module and I2C LCD to Arduino UNO as shown in the circuit diagram.
  2. Upload the Arduino program.
  3. Pair the mobile phone with HC-05.
  4. The default PIN is generally 1234 or 0000.
  5. Open a Bluetooth Terminal application on the mobile phone.
  6. Connect the application to HC-05.
  7. Type a message such as “Hello Arduino” and press Send.
  8. The HC-05 receives the message and transfers it to Arduino.
  9. Arduino displays the received message on the 16×2 LCD.

Working Principle





Mobile Phone → Bluetooth (HC-05) → Arduino UNO → I2C LCD

When a user sends text from the mobile phone, HC-05 receives the data wirelessly. Arduino reads this data through the serial communication pins and displays it on the LCD.

Result

The HC-05 Bluetooth module was successfully interfaced with Arduino UNO, and data received from a mobile phone was displayed on the 16×2 LCD.

Post a Comment

0 Comments

Post a Comment (0)
3/related/default