#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd1(0x24,16,2);
LiquidCrystal_I2C lcd2(0x25,16,2);

#define led1 4
#define led2 5
#define led3 6
#define led4 7

int del = 500;
int inp;

void setup()
{
  lcd1.init();                      
  lcd1.backlight();

  lcd2.init();                      
  lcd2.backlight();
  lcd2.setCursor(0,0);
  lcd2.print("Hello, world2");

  Serial.begin(115200);
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4, OUTPUT);
  Serial.println("start");
}

void loop()
{
  
  while (Serial.available() != 0)
  {
    inp = Serial.read();

    if(inp == 49)
    {
      lcd1.clear();
      digitalWrite(led1, 1);
      lcd1.setCursor(0,0);
      lcd1.print(inp);
    }
    if(inp == 50)
    {
      lcd1.clear();
      digitalWrite(led2, 1);
      lcd1.setCursor(0,0);
      lcd1.print(inp);
    }
    if(inp == 51)
    {
      lcd1.clear();
      digitalWrite(led3, 1);
      lcd1.setCursor(0,0);
      lcd1.print(inp);
    }
    if(inp == 52)
    {
      lcd1.clear();
      digitalWrite(led4, 1);
      lcd1.setCursor(0,0);
      lcd1.print(inp);
    }
  }
  
  
}