What Is I2C Communication in Simple Terms
I2C lets you communicate with many devices using only two wires. Learn how addressing works, how multiple devices share the same bus, and how to scan for I2C devices with Arduino.

When I built my first complex Arduino project—a DIY desktop weather station—I quickly ran into a major roadblock. I wanted to connect a real-time clock, a barometric pressure sensor, a temperature sensor, and a small display screen to my board. But when I counted the pins needed for all these devices, I realized I had completely run out of digital inputs. That was the day I discovered I2C, and it completely changed how I design circuits.
I2C, which stands for Inter-Integrated Circuit, is a communication protocol that lets a microcontroller talk to multiple devices using just two physical wires. Instead of running dedicated lines to every single sensor, you connect them all to a shared communication bus. It feels like magic when you see five different modules running off the exact same two pins on your Arduino.
The Two-Wire Highway
To understand I2C, think of it as a shared highway where data travels. The protocol relies on two specific lines: SDA (Serial Data) and SCL (Serial Clock). SDA carries the actual data packets back and forth, while SCL is a clock pulse generated by the controller to keep the transfer timing in sync.
Unlike simple serial communication, I2C is an open-drain bus. This means the devices themselves cannot drive the communication lines HIGH; they can only pull them LOW. To keep the lines HIGH when nobody is talking, we use pull-up resistors connected to VCC (usually 4.7k-ohms). When a device wants to send a bit, it releases the line for a '1' or pulls it down to ground for a '0'.
Here is a quick look at the physical wires and their jobs:
- SDA (Serial Data Line): The shared pathway where data bits flow between the controller and the devices.
- SCL (Serial Clock Line): The timing signal that dictates when devices should read the data bits from the SDA line.
- Pull-Up Resistors: Small resistors (usually 4.7K) that keep the SDA and SCL lines at 5V or 3.3V when the bus is idle.
Solving the Identity Crisis: Addressing
If every sensor is connected to the exact same two wires, how does the Arduino know which sensor it is talking to? The answer lies in software addressing. Every I2C-compatible device has a unique 7-bit address pre-programmed into its hardware by the manufacturer.
When the controller wants to talk to a sensor, it sends a start signal followed by the target device's address. All connected devices hear this address, but only the one with the matching address responds with an Acknowledge (ACK) bit. It is like a teacher calling out a student's name in a crowded classroom; everyone hears it, but only the called student speaks up.
Here are some of the most common default I2C addresses I use in my projects:
| Common I2C Device | Default Address | Primary Purpose |
|---|---|---|
| SSD1306 OLED | 0x3C / 0x3D | Monochrome screen display. |
| DS1307 RTC | 0x68 | Real-time clock tracking. |
| MPU6050 Accel/Gyro | 0x68 / 0x69 | Motion and rotation detection. |
| BMP280 Sensor | 0x76 / 0x77 | Barometric pressure + Temperature. |
Sometimes, you might want to use two identical sensors (like two BMP280 sensors) in the same project. Since they share the same default address, they will conflict. Most modules have hardware address pins or solder pads that let you change the address slightly (for example, switching it from 0x76 to 0x77 by tying an address pin to VCC).
The Ultimate Troubleshooting Tool: The I2C Scanner
Whenever I hook up a new sensor and nothing shows up on my screen, I don't waste time checking code logic. Instead, I immediately upload an I2C scanner sketch. This simple program pings every address on the bus and reports back if it gets an acknowledgment.
This scanner is the single most useful diagnostic tool for I2C projects. It will tell you if your device is wired incorrectly, if the pull-up resistors are missing, or if the sensor is using a different address than you expected.
Pros and Cons of I2C
I2C is incredibly popular because of its simplicity. By standardizing connections to just SDA and SCL, you can daisy-chain modules easily. For instance, connecting an I2C adapter board (backpack) to a standard LCD1602 display drops the required control pins from 6 down to just 2, saving critical pin count.
However, it does have limits. Because all devices share the same wires, I2C is slower than protocols like SPI, as it has to send address bytes and wait for confirmations. Additionally, the length of the bus wires is limited to a few feet because long wires build up electrical capacitance, which distorts the sharp digital signals.
For simple hobby projects, weather stations, and robotics, I2C is almost always my go-to choice. It keeps my breadboards neat, simplifies my wiring diagrams, and leaves plenty of pins free for buttons, relays, or PWM indicators.
I am a 21-year-old IoT enthusiast who loves microcontrollers and exploring new components. I built IoTSimulator to help beginners learn without needing a pile of hardware.


