Why delay of 1500ms after wire.begin() ?

Hello,

I am wondering why there is a delay in the setup function after initialising the I2C communication. I have connected an MPU6050 to the SDA and SCL pins.

My guess is that it is necessary to wait for the I2C communication to begin? But i can't understand if it's a limitation based on the Arduino or the I2C device, in this case, the MPU6050?

Is 1500ms a common or recommended value for the delay to wait for the I2C communication to be established? There is also another delay of only 2ms after the MPU6050 is initialised?

void setup() 
{
  Serial.begin(9600);                //open the serial monitor, set the baud rate to 9600
  Wire.begin();                      //join I2C bus sequence
  
  delay(1500);  //why is this delay here?? and why 1500ms?

   mpu6050.initialize();           //initialize MPU6050
  
  delay(2);  //why is there another delay here and why is it only 2ms?

}

Ask whoever wrote the code. I don't know why the delay is there. I have never used a delay after Wire.begin() in any of my programs.

You've asked a lot of questions. Now, let me ask a couple of questions.

What changes happened when you commented out the 1500 millisecond delay()?
What changes happened when you commented out the 2 millisecond delay()?
Why didn't you?

OK, that was three questions...

DryRun:
Hello,

I am wondering why there is a delay in the setup function after initialising the I2C communication. I have connected an MPU6050 to the SDA and SCL pins.

My guess is that it is necessary to wait for the I2C communication to begin? But i can't understand if it's a limitation based on the Arduino or the I2C device, in this case, the MPU6050?

Is 1500ms a common or recommended value for the delay to wait for the I2C communication to be established? There is also another delay of only 2ms after the MPU6050 is initialised?

void setup() 

{
  Serial.begin(9600);                //open the serial monitor, set the baud rate to 9600
  Wire.begin();                      //join I2C bus sequence
 
  delay(1500);  //why is this delay here?? and why 1500ms?

mpu6050.initialize();          //initialize MPU6050
 
  delay(2);  //why is there another delay here and why is it only 2ms?

}

There is no real reason that I can see. The delays are not needed.