Inter-Integrate Circuit, aka I2C, is an extremely popular method for connecting one or more peripheral devices, like sensor breakouts, to a host controller, like an Arduino board. It only requires two pins for data and clock and can support attaching over 100 devices. It's so popular that it even gets its own special, easy to use connector via Adafruit's STEMMA / STEMMA QT and Sparkfun's Qwiic. It's pretty much plug-and-play!
However, it's not all sunshine, rainbows, and lollipops when dealing with I2C. This guide goes into some of the main hiccups that one may encounter when dealing with I2C devices.
If you are just wanting to use I2C devices, you don't really need to read this guide. Ideally, you can just use an available library and follow its documentation. The library writer, to the extent possible, has taken care of the low-level details. But the information here can still be helpful. It will give more context to what the device "address" is all about, etc.
If you are curious about the struggles a library developer deals with, or are wanting to write a library for an I2C device, then this guide hopefully provides some helpful background information on some of the main technical bumps.
Or just give it a read to increase your understanding of I2C, to better understand some of the lingo, etc. There's no project here. Just a grab bag of I2C related topics. Enjoy!
I2C Bus Specification
The original specification goes back to the 1980's and was created by what was then Phillips Semiconductors, which is now known as NXP Semiconductors. The specification is available from NXP's website here:
Text editor powered by tinymce.