#include String lcdLine = ""; // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. //lcd.print("hello, world!"); // start serial port at 9600 bps: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for native USB port only } } void loop() { lcdLine = ""; lcdLine = Serial.readStringUntil("\n"); if (lcdLine.length() > 0) { lcd.setCursor(0, 0); lcdLine.trim(); lcd.print(lcdLine); } }