Devices & Components
Arduino Uno Rev3
HC-05 Bluetooth Module
Jumper wires (generic)
Alphanumeric LCD, 16 x 2
Breadboard (generic)
Resistor 1k ohm
Software & Tools
Arduino Bluetooth Control App
LiquidCrystal.h Library
Project description
Code
Code
c_cpp
1#include <LiquidCrystal.h> 2/* 3 * Idea By:- Devloper Krishna Agarwal (DIY Inventor) 4 * Devloper Krishna Agarwal (DIY Inventor) 5 * Desgign By:- Devloper Krishna Agarwal (DIY Inventor) 6 */ 7char str[34],L=2; 8int draft=0,i=0; 9int Pass=0,p=0; 10 int c,x,d; 11 12LiquidCrystal lcd(11,10,5,4,3,2); 13 14void setup() 15{ 16 Serial.begin(9600); 17 pinMode(7,OUTPUT); 18 lcd.begin(16, 2); 19 20 21} 22 23 24void loop() 25{ 26 if(draft==1) 27 { 28 check(); 29 draft=0; 30 i=0; 31 delay(1000); 32 } 33 34} 35 36void serialEvent() 37 { 38 while (Serial.available()) 39 { 40 char inChar=Serial.read(); 41 str[i++]=inChar; 42 delay(10); 43 } 44 for (p=i+1;p<34;p++) 45 { 46 str[i++]=32; 47 } 48 draft=1; 49 Serial.write(str); 50 lcd.setCursor(0, 0); 51 lcd.print(str); 52 if(i>16) 53 { 54 d=16; 55 for (x=0;x<=17;x++) 56 { 57 lcd.setCursor(x,2); 58 lcd.print(str[d]); 59 d++; 60 } 61 } 62 } 63 64void check() 65{ 66if(!(strncmp(str,"1",1))) 67 { 68 digitalWrite(7,50); 69 lcd.clear(); 70 } 71 else if(!(strncmp(str,"2",1))) 72 { 73 digitalWrite(7,LOW); 74 lcd.clear(); 75 } 76} 77
Downloadable files
Circuit Diagram
Connection of HC-05 Hook the GND pin (Negative Pin) of HC-05 to Pin GND of Arduino. Connect Red VCC Pin (Positive Pin) of HC-05to VCC of Arduino. Connect TX pin (Data Transfer Pin) of HC-05to RX pin of Arduino. Connect RX Pin of HC-05 to TX Pin of Arduino. Connection Of LCD Connect the First pin from the left of LCD (GND pin) with GND pin of Arduino. Connect the Second pin from the left of LCD (VCC pin) with VCC pin of Arduino. Connect the Third pin from the left of LCD (V0 pin) with GND pin of Arduino. Connect the Fourth pin from the left of LCD (RS pin) with 11 pin of Arduino. Connect the Fifth pin from the left of LCD (R/W pin) with GND pin of Arduino. Connect the Sixth pin from the left of LCD (E pin) with 10 pin of Arduino. Connect the Eleventh pin from the left of LCD (D4 pin) with 5 pin of Arduino. Connect the Twelveth pin from the left of LCD (D5 pin) with 4 pin of Arduino. Connect the Thirteen pin from the left of LCD (D6 pin) with 3 pin of Arduino. Connect the Fourteenth pin from the left of LCD (D7 pin) with 2 pin of Arduino. Connect the Fifteenth pin from the left of LCD (5V pin) with 1 K Resistor with 2 pin of Arduino. Connect the Last pin from the left of LCD (GND pin) with GND pin of Arduino
Circuit Diagram

Circuit Diagram
Connection of HC-05 Hook the GND pin (Negative Pin) of HC-05 to Pin GND of Arduino. Connect Red VCC Pin (Positive Pin) of HC-05to VCC of Arduino. Connect TX pin (Data Transfer Pin) of HC-05to RX pin of Arduino. Connect RX Pin of HC-05 to TX Pin of Arduino. Connection Of LCD Connect the First pin from the left of LCD (GND pin) with GND pin of Arduino. Connect the Second pin from the left of LCD (VCC pin) with VCC pin of Arduino. Connect the Third pin from the left of LCD (V0 pin) with GND pin of Arduino. Connect the Fourth pin from the left of LCD (RS pin) with 11 pin of Arduino. Connect the Fifth pin from the left of LCD (R/W pin) with GND pin of Arduino. Connect the Sixth pin from the left of LCD (E pin) with 10 pin of Arduino. Connect the Eleventh pin from the left of LCD (D4 pin) with 5 pin of Arduino. Connect the Twelveth pin from the left of LCD (D5 pin) with 4 pin of Arduino. Connect the Thirteen pin from the left of LCD (D6 pin) with 3 pin of Arduino. Connect the Fourteenth pin from the left of LCD (D7 pin) with 2 pin of Arduino. Connect the Fifteenth pin from the left of LCD (5V pin) with 1 K Resistor with 2 pin of Arduino. Connect the Last pin from the left of LCD (GND pin) with GND pin of Arduino
Circuit Diagram

Comments
Only logged in users can leave comments