Let's think about it this way for a moment
I2C (Inter-Integrated Circuit) is a protocol that lets you connect many devices to a single bus using just two wires (SDA for data + SCL for clock) — each device has a unique address, and the Pi uses that address to decide which device it wants to talk to. SPI (Serial Peripheral Interface) uses more pins (MOSI, MISO, SCLK, CS) but runs faster — it's commonly used for high-speed sensor/display modules.
Let's connect it to a real scenario
You can chain I2C temperature sensors, OLED displays, and real-time clock modules together on the same I2C bus (just the two SDA/SCL pins) — with several devices connected, running the i2cdetect -y 1 command scans and shows you a list of connected device addresses (handy for troubleshooting). You'll need to enable the I2C interface in raspi-config (disabled by default, just like the Camera interface).
Let's look at it together
# Enable I2C interface
sudo raspi-config
# Interface Options → I2C → Enable
# Install i2c-tools
sudo apt install i2c-tools
# Scan for connected I2C devices
i2cdetect -y 1Running i2cdetect -y 1 should display a grid table, highlighting the address (e.g. 0x3c) of any device that's connected.5-minute try-it
If you have an I2C sensor module, connect it and run i2cdetect -y 1 — see if you can spot its device address.
A quick word of caution
If you have multiple devices on an I2C bus, an address conflict (two devices sharing the same address) can cause communication errors — double-check each device's default address against its datasheet.