The I2C Protocol
A two-wire bus that lets a microcontroller talk to dozens of sensors and chips at once, each with its own address.
UART works well for two devices, but most real projects need to talk to several sensors and chips at once — wiring a dedicated pair of TX/RX pins to each one quickly runs out of pins. I2C (inter-integrated circuit, often pronounced "eye-squared-C") solves this with a shared two-wire bus that many devices can connect to simultaneously.
The two wires are SDA (serial data, carrying the actual bits) and SCL (serial clock, a timing signal that keeps every device on the bus synchronized). Unlike UART, I2C does include a shared clock line, which is why devices don't need to be pre-configured with a matching baud rate — the clock does that job.
Every device on an I2C bus has a unique address — usually a 7-bit number set by the manufacturer, sometimes with a couple of address pins you can strap to adjust it if multiple identical sensors need to share one bus. When the microcontroller (acting as the master) wants to talk to a specific sensor, it first sends that sensor's address on the bus; every device listens, but only the one matching that address responds — every other device stays silent.
Because I2C only needs two wires no matter how many devices are attached, it's the default choice for connecting a handful of sensors (an accelerometer, a real-time clock, a small display) to one microcontroller without running out of pins. Its main tradeoff versus SPI (next lesson) is speed — I2C is generally slower, though plenty fast enough for most sensor readings.