   // put your setup code here, to run once:
   Serial.begin (9600);
   RadioSetup();
-  Report.Robot = 1;
-  Report.Message = 1;
   lcd.begin(16,2);
   lcd.setBacklight (HIGH);
+  //Report.Robot = 1;
 
 }
 
 void loop() {
   // put your main code here, to run repeatedly:
-  //ReceiveReport();
-  Serial.println(Report.Robot);
-  if (Report.Robot == 0){
-    lcd.setCursor (5,0);
-    lcd.print ("UNBALL");
+  ReceiveReport();
+  if(state[0] != Data[0].Message || state[1] != Data[1].Message || state[2] != Data[2].Message){
+    Serial.println(Report.Robot);
+    Serial.println(Report.Message);
+    Print_lcd();
+    state[0] = Data[0].Message;
+    state[1] = Data[1].Message;
+    state[2] = Data[2].Message;
   }
-  if (Report.Robot == 1){
-    lcd.setCursor (5,0);
-    lcd.print ("ROBOT 0");
-  }
-  if (Report.Robot == 2){
-    lcd.setCursor (5,0);
-    lcd.print ("ROBOT 1");
-  }
-  if (Report.Robot == 3){
-    lcd.setCursor (5,0);
-    lcd.print ("ROBOT 2");
-  }
- // lcd_print (Report.Robot, Report.Message);
- delay(1000);
+  delay(500);
 }
 
 void RadioSetup(){

    radio.startListening();                 // Start listening
}

void ReceiveReport(){       //Function to receive data
  if(radio.available()){
    radio.read(&Report, sizeof(DataStruct));
  }
}

/*void lcd_print (int a, int b){
  if (Report.Robot == 0){
    lcd.setCursor (5,0);
    lcd.print ("UNBALL");
  }
  if (Report.Robot == 1){
    lcd.setCursor (5,0);
    lcd.print ("ROBOT 0");
  }
  if (a == 2){
    lcd.setCursor (5,0);
    lcd.print ("ROBOT 1");
  }
   if (a == 3){
    lcd.setCursor (5,0);
    lcd.print ("ROBOT 2");
  }
}*/





#include <LiquidCrystal_I2C.h>

struct DataStruct{
    int Robot=0;
    int Message=0;
};

DataStruct Report, vel, Data[3];
int ctr=0;
int state[3] = {49, 49, 49};
int msg[3] = {0, 0, 0};
int CE = A0; //pro micro
int CS = 10; //pro micro

