Introduction
In this article, I will explain about controlling the LCD display by using BlueTooth (HC05). It will control and display the name that we have set in our mobile phone. And, I will show the demo of how it works.
List of Parts
Hardware Parts
- Arduino Uno
- Potentiometer
- Bread Board
- Resistor
- BlueTooth (HC05).
- Mobile Phone
- Hook up wires
Software Required
Parts Explanation
BlueTooth HC05
- The BlueTooth HC05 is used to communicate the message from Arduino to mobile phone.
- It is a wireless device to send the message clearly.
Figure1 - HC05
Connection
Arduino To Bluetooth Module(HC05)
- In the Bluetooth, the Vcc should be connected to the 5v supply of the Arduino board.
- In the Bluetooth, the Gnd should be connected to the Gnd supply of the Arduino board.
- In the Bluetooth, the Tx should be connected to the Rx of the Arduino board.
- In the Bluetooth, the Rx should be connected to the Tx of the Arduino board.
LCD Display To Arduino Uno
- Fix the LCD in 16 to 2 of the bread board.
- The 16 pin to the Gnd.
- The 15 pin to the Vcc.
- The 14 pin to the Digital pin 12.
- The 13 pin to the Digital pin 11.
- The 12 pin to the Digital pin 05.
- The 11 pin to the Digital pin 04.
- The 01 pin to the Gnd.
- The 02 pin to the Vcc.
- The 03 pin to the potentiometer.
- The 04 pin to the Digital pin 03.
- The 05 pin to the Gnd.
- The 06 pin to the Digital pin 02.
Figure 2 - LCD Display
Potentiometer To LCD Display
- Connect the Arduino board to the LCD display as per the preceding figure.
- The Vin should be connected to the LCD display in 03.
Programming For LCD Coding
- #include <LiquidCrystal.h>
-
- LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
- String readString;
-
- void setup() {
- Serial.begin(9600);
- lcd.begin(16, 2);
- }
-
- void loop() {
- while(Serial.available()){
- delay(50);
- char c=Serial.read();
- readString+=c;
- }
- if(readString.length()>0){
- Serial.println(readString);
- if (readString =="button_1"){
- lcd.clear();
- lcd.print("Mert Arduino");
- }
-
- if (readString =="button_2"){
- lcd.clear();
- lcd.print("Hello World");
- }
-
- if (readString =="button_3"){
- lcd.clear();
- lcd.print("Please Subscribe");
- }
-
- if (readString =="button_4"){
- lcd.clear();
- lcd.print("Youtube Channel");
- }
- readString="";
- }
- }
Explanation
- It will be used to display the LCD connection by the above code that is uploaded to the Arduino Board.
- It will simply connect and switch ON the LCD display.
- The potentiometer is used to display and adjust.
- Then we can upload the bluetooth coading what we have done in the MIT App Inverter.
- In the MIT App Inverter we can set the 4 button and Save the program.
OUTPUT
Figure 4 - Output1
Figure 5 - Output 2