#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.begin(16, 2);
lcd.backlight();
Serial.begin(9600);
Serial.println("salom");
}
void loop() {
lcd.clear();
lcd.setCursor(0, 0);
while (Serial.available() == 0) {
}
String kiritilganMatn = "";
while (Serial.available() > 0) {
char simvol = Serial.read();
kiritilganMatn += simvol;
delay(50);
}
lcd.setCursor(0, 1);
lcd.print(kiritilganMatn);
Serial.println();
Serial.println(kiritilganMatn);
delay(2000);
for (int i = 0; i < 100; i++) {
lcd.scrollDisplayLeft();
delay(200);
}
}