//I2C接口LCD1602的模块资料链接:https://wiki.dfrobot.com.cn/_SKU_DFR0063_IIC_LCD1602_display_module_%E5%85%BC%E5%AE%B9Gadgeteer
//I2C接口LCD1602的模块仿真资料链接:https://docs.wokwi.com/parts/wokwi-lcd1602
//代码用于Firebeetle ESP32开发板时,LCD连接电源到VCC,GND,SDA和SCL,
//3.3V电源供电电压低于5V,不能满足该模块的需要,而VCC是5V电压,可以驱动该LCD模块
#include <Wire.h> //该头文件wokwi仿真时必不可少,否则编译不通过,但Arduino IDE编译时可以不写
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x20,16,2);
void setup() {
  // put your setup code here, to run once:
  lcd.init();
  lcd.backlight();
     lcd.setCursor(0,0);
   lcd.print("Hello");
   lcd.setCursor(6,0);
   lcd.print("Student");
  Serial.begin(9600);
  Serial.println("Enter Your Input Here: ");

}

void loop() {
  // put your main code here, to run repeatedly:
 String x = Serial.readStringUntil('\n');
 lcd.setCursor(0,0);
 lcd.print("Entered Value : "); 
 lcd.setCursor(0,1);
 lcd.print(x);  
   delay(500); // this speeds up the simulation
}