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
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+.
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!.
We may earn a commission for purchases using our links. Learn more.
These are the SD cards you want for your Raspberry Pi 3 B+
The Raspberry Pi 3 B+ doesn't need a huge amount of storage, and you don't need to spend more money on huge storage. Here's are the best SD cards for the Raspberry Pi 3 B+!
From the novice to the experienced, these are the best Raspberry Pi kits
Raspberry Pi is a great way to get into the world of do-it-yourself electronics, and you can start with one of these kits. There are kits for all experience levels and price-ranges, starting with something like the Raspberry Pi Zero W and going all the way up to the Raspberry Pi 4.
Play your favorite games with one of the best controllers for Raspberry Pi
You can't play Mario Kart without a controller. And you really need to play Mario Kart, right? So we have found some of the best controllers that you can use to play your favorite retro games on a Raspberry Pi.