/* #include #include LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display void setup() { lcd.init(); // initialize the lcd lcd.init(); // Print a message to the LCD. lcd.backlight(); lcd.setCursor(1,0); lcd.print("hello everyone"); lcd.setCursor(1,1); lcd.print("konichiwaa"); } void loop() { } */ #include #include LiquidCrystal_I2C lcd(0x27,20,4); #include SoftwareSerial myserial(0, 1); void setup() { myserial.begin(9600); pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output pinMode(echoPin, INPUT); // Sets the echoPin as an Input } void loop() { int chr = myserial.read();// chr will be equal to which the serial will read lcd.init(); // initialize the lcd lcd.init(); // Print a message to the LCD. lcd.backlight(); lcd.setCursor(1,0); lcd.print("distance"); lcd.setCursor(1,1); lcd.print(chr); }