master device and a slave device connected via I2C

Hi i am new in arduino and I have a master device and a slave device connected via I2C. salve has an ultrasonic sensor measuring the distance and sends to master to turn on the led

what i found in internet only to send the data from master to slave ...

anyone have any suggestion ):

Who decided which one was the master ?

actually it is two slave with two ultrasonic send to master to turn on LEDs

so the arduino with LEDS should be master ...yes ?

If download an app called Blynk, this is an app which allows you to control your devices via your phone. You create your own app with the widgets they provide and one of the widgets is called a "Bridge" widget. This allows communication between devices via wifi. Have a look it might change your whole approach on building projects

You (on behalf of Master) send command to Slave-1 to tell that you (the Master) wants to read data from it. How many bytes? Say, it is 5-byte.

Wire.requestFrom(slave1Address, 5);
for(int i=0; i<5; i++)
{
    myData[i] = Wire.read();     //save data in array and process
}
Wire.end.Transmission();