Skip to content

October 3, 2018

Does the Raspberry Pi 3 B+ support I2C?

by John_A

What-is-Raspberry-Pi-5.jpg?itok=7lNoW1Oh

Best answer: Yes. The Raspberry Pi supports the I2C interface through its GPIO header. It’s disabled by default so you’ll need to enable the hardware and install some utilities before you can use it.

Amazon: Raspberry Pi 3 B+ ($40)

What’s an I2C interface?

The I2C interface (it’s actually I²C or I-squared-c but nobody wants to type that, hence the nickname) is the end point of an inter-integrated circuit serial bus that doesn’t need high-speed communication. The transmission is synchronous and packet-switched and can host multiple masters and multiple slave devices on the same bus. You’ll find it used anywhere. Simplicity is more important than speed and it’s commonly used for attaching sensors or monitoring equipment.

For hobby applications, the I2C bus is commonly used to attach a PC board to an LCD. An I2C backpack board can trim the number of connections needed from 16 down to two, and with I/O pins always in short supply, that makes the I2C bus very valuable for many projects. To learn more about the I2C bus and Serial communications in general, Sparkfun has a great primer to get you started.

Using the I2C interface on the Raspberry Pi

arm_i2c.png?itok=Yk5P4Z6L

By default, your Raspberry Pi has the I2C interface disabled. Don’t worry, it’s easy to enable it.

You’ll use the same configuration tool you saw when you first turned on your Raspberry Pi. To bring it back, type sudo raspi-config from the command line. You’ll find the option to enable the I2C option under Interfacing Options.

After a reboot, you can then install any utilities and debugging tools such as i2c-tools or the python-smbus libraries through the standard package manager using the apt-get command. Your project and the coding language you’re using will determine exactly what extras you’ll need to communicate over the I2C bus using the standard GPIO pins on your Raspberry Pi 3 B+.

Our pick

Raspberry Pi 3 B+

raspberry-pi-3-b.png?itok=dyzVONsg

$40 at Amazon

Includes legacy bus communications

The Raspberry Pi 3 B+ supports many different types of serial communication through its GPIO pins, including the I2C interface. This is one of the reasons we love this little single board computer!.

Advertisements
Read more from News

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments

%d bloggers like this: