How to use wire h library arduino

broken image

Values will be displayed on the 16x2 LCD connected to each of the Arduino. In this Arduino I2C tutorial we will use I2C communication between two arduino boards and send (0 to 127) values to each other by using potentiometer.

broken image

I2C communication is generally used to communicate with Gyroscope, accelerometer, barometric pressure sensors, LED displays etc. So there are more than one microcontroller in a project that need to be masters then I2C is used. Comparing I2C with SPI, I2C has only two wires while SPI uses four and I2C can have Multiple Master and Slave, while SPI can have only one master and multiple slaves. Today we will learn about another Serial Communication Protocol: I2C (Inter Integrated Circuits). In our previous tutorial learned about SPI communication in Arduino.

broken image