Prototyping with the I2C protocol

In the previous section, sensors or actuators were directly communicating with Arduino via digital, analog, or PWM pins. These methods are utilized by a large number of basic, low-level sensors and you will be widely using them in your future Arduino projects. Beside these methods, there is a wide variety of popular sensors that are based on integrated circuit (IC), which require different ways of communication. These IC-based advanced sensors utilize I2C- or SPI bus-based methods to communicate with the microcontroller. As we are going to use I2C-based sensors in the upcoming projects, the section will only cover the I2C protocol and practical example to understand the protocol in a better way. Once you understand ...

Get Python Programming for Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.