Paso 3: código
Ahora vamos a escribir el código:
#include <LiquidCrystal.h> //Include the library that enables you to use the LCD LiquidCrystal lcd(2,3,4,5,6,7);//Declare that your LCD is connected to pins 2,3,4,5,6 & 7 on your Arduino void setup() { lcd.begin(16,2);//16 by 2 are the dimensions of the LCD (in number of characters) Serial.begin(9600);//launch the process of receiving serial data (via bluetooth) at 9600 bits/s } void loop() { if(Serial.available()){ lcd.write(Serial.read());//these two lines mean that if there is data coming from the BT module, the Arduino prints it on the LCD. } } //Before uploading the code to the Arduino, disconnect the Tx and Rx pins, otherwise you won't be able to upload. Once the code uploaded, reconnect them.
Ahora abra BlueTerm, vestíos de BlueTooth y HC-05. Entonces simplemente escriba que su texto y se deben imprimir en la pantalla LCD.