Connecting multiple I2C device on Arduino Uno R3

Hello every one ! welcome back ! It’s nice to show you my new tutorial after long time .Today we will learn how to connect multiple I2C device (typically for demo temperature sensor ) to the Arduino Uno .I recommend download datasheet of that I2C device you are going to interface with Arduino before jump into coding.

I2C communication Protocal

I²C (also referred as IIC or TWI ) pronounced as I square C is widely used communication protocal . If we wish to use multiple device with serially communicating device then I2C is the best way to communication between a microcprocessor and multiple device like motors , LCD , LED , EEPROM , etc . In this method we can control ( communicate ) up to 128 device which is almost impossible with conventional USART method . I2C bus consists of two lines called Serial Data Line (SDA) and Serial Clock Line (SCL) ,Communication between devices is master and slave based. Master generates clock signal, initiates and terminates data transfer. In many case microcontroller is master and it generate clock and address for multiple slave devices . From electrical point of view I2C devices use open drain (open collector) pins. In order to operate correctly SDA and SCL lines require pull up resistors. Typically 4.7kΩ resistors are used as shown in figure below .And The devices that we are using TWI must support TWI protocal .

The complete tutorial about I2C or TWI protocal can be found in this section . The short description of this project is below the code .