CHAPTER 8

The I2C Bus

Parts You'll Need for This Chapter

Arduino Uno

USB cable (A to B for Uno)

Red LED Yellow LEDs (×3)

Green LEDs (×4)

220Ω resistors (×8)

4.7kΩ resistors (×2)

SN74HC595N shift register DIP IC

TC74A0-5.0VAT I2C temperature sensor

Jumper wires

Breadboard

CODE AND DIGITAL CONTENT FOR THIS CHAPTER

Code downloads, video, and other digital content for this chapter can be found at www.exploringarduino.com/content/ch8.

In addition, all code can be found at www.wiley.com/go/exploringarduino on the Download Code tab. The code is in the chapter 08 download and individually named according to the names throughout the chapter.

You've already learned how to connect both analog and digital inputs/outputs, but what about more complicated devices? The Arduino can expand its capabilities by interfacing with a variety of external components. Many integrated circuits implement standardized digital communication protocols to facilitate communication between your microcontroller and a wide array of possible modules. This chapter explores the I2C bus (pronounced “eye squared see” or “eye two see”).

The I2C bus enables robust, high-speed, two-way communication between devices while using a minimal number of I/O pins to facilitate communication. An I2C bus is controlled by a master device (usually a microcontroller), and contains one or more slave devices that receive information from the master. In this chapter, you learn about the I2C protocol, and you implement it to communicate ...

Get Exploring Arduino: Tools and Techniques for Engineering Wizardry 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.