From the course: Raspberry Pi: GPIO

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

I2C in depth

I2C in depth

From the course: Raspberry Pi: GPIO

Start my 1-month free trial

I2C in depth

- [Instructor] I squared C is a useful data communication protocol and we've used it in the most basic ways, but there are some things to know if you plan to do more complex tasks. There are two complexities when working with I squared C in the Raspberry Pi: device identification, and I squared C bus zero. Let's start with device identification. In our project we put both the BME280 and the PCA9685 on the same I squared C bus. So what's the problem? The problem is conflicting addresses. Earlier we talked about SPI devices and how they use a separate pin and signal to select the chip. If you set a GPIO pin to a positive voltage, the SPI chip is enabled. In contrast, I squared C depends on each device having a slave address hard coded into the memory of the module. And those addresses need to be unique for each module. For example, you can't have two BME280 modules on the same I squared C bus because they have…

Contents