// programa para display
#include <LiquidCrystal.h>
int rs = 7;
int en = 8;
int d4 = 9;
int d5 = 10;
int d6 = 11;
int d7 = 12;
String msg;
LiquidCrystal lcd(rs,en,d4,d5,d6,d7);// crear el objeto LCD con sus conexiones
void setup() {
// put your setup code here, to run once:
lcd.begin(16,2); // 16,2 son paramteros por el tipo de display
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Enter your msg");
lcd.setCursor(0,0); //Es para posicionar el cursor en la posicion 0
while(Serial.available()==0){
// este while se utiliza para en programa espere a introducir informacion
}
msg =Serial.readString();
lcd.print(msg);
delay(2000);
//lcd.clear();
delay(2000);
}