Therefore the master can easily know with which slave it communicates. I2C uses only 2 wires because each device has a unique address assigned to it.
Reason for I2C easy implementation comes from the fact that only 2 wires are needed for communication, we do need to connect the devices to the common ground as well but the ground is not directly used in the communication. I2C communication is very popular and broadly used, because of its easy implementation in electronic devices. After the basics are explained we will show an example how to blink an LED using the I2C through a serial monitor. Here we will talk about I2C communication between two Arduinos.įirst we will mention how to set up an Arduino as either a master or a slave.