I2C communication with ESP32
I2C is another serial communication protocol, but unlike the UART protocol, it is a synchronous communication protocol that is used for communications between integrated circuits or devices on a shared bus. Since it is a synchronous communication protocol, it requires a clock signal and works in the master-slave architecture. Therefore, it is commonly used in scenarios where multiple devices need to communicate with the master/central device.
In this section, we will explore the following topics related to I2C communication in the context of ESP32 and Arduino IDE:
- How I2C communication works
- I2C communication example using ESP32
- Sensors that use I2C communication
By the end of this section, you will be able to explain the I2C protocol, differentiate it from UART, use it with ESP32 using Arduino IDE, and understand some of the common sensors available on the market that can be interfaced using I2C.