I'm trying write a program where I put in a string on the serial monitor and it displays it to the lcd but when I run it nothing is displayed. All my connections are fine as I've used it in a simple program. Here is the code:
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
String Word;
void setup() {
// put your setup code here, to run once:
lcd.begin(16, 2);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Word of 16 characters:");
while (Serial.available()==0){}
Word = Serial.readString();
lcd.clear();
lcd.setCursor(0, 0);
if (Word.length() > 16){
lcd.print(Word);
}
else {
lcd.print("Too Big!");
}
delay(500);
}
Is there anything wrong?