I2C device addressing

Graynomad:
How do they know another slave/master has not already started transmitting? Is there a mechanism in I2C to handle that?

The AtMega's support HW multi-master bus arbitration. The scheme is based on masters listening for bus activity (start/stop) and then only claim the bus when idle. This generally works when arbitration is only required once every blue moon, but it will not work when two or more devices try to claim the bus at the exact same clock edge (such as may be the case when multiple identical devices are powered on at the same time). For this some software retry scheme will be required.

For most practical purposes (as opposed to academic), storing a unique address in EEPROM is a good option.