What Is I2C? Pinouts, Wiring, and Common Errors (2026 Guide)
Share
What Is I2C? Pinouts, Wiring, and Common Errors (2026 Guide)
I2C is a two-wire communication bus that lets one microcontroller talk to several sensors and displays over the same two pins, each device told apart by its own address. On an Arduino Uno the bus lives on A4 (SDA) and A5 (SCL), and most breakout boards already carry the pull-up resistors the bus needs.
Quick answer: I2C uses two shared wires — SDA for data, SCL for the clock — plus a common ground, and every device gets a unique address instead of its own pins. On an Arduino Uno, SDA is A4 and SCL is A5. Run a scanner sketch first to find each device's address rather than guessing it.
Proof of work: the explanation and code below are Soldr's actual answer to "What is I2C and how do I use it?", asked through Compoden's AI build assistant on 11 August 2026. Published 11 August 2026 · Last updated 11 August 2026.
How does the I2C bus actually work?
Two wires carry everything: SDA moves the data bits, SCL is the clock that times them, and a shared ground completes the circuit. Because every device listens on the same two wires, each one needs a unique I2C address so the microcontroller knows which device it's talking to — this is the key difference from SPI, where each device instead gets its own dedicated select line.
| Property | Value |
|---|---|
| Wires | 2 signal (SDA, SCL) + shared GND |
| Speed | Typically 100–400 kHz (slower than SPI's megahertz range) |
| Device addressing | Each device has its own address on the shared bus |
| Pull-ups | Required on SDA/SCL; usually already fitted on breakout modules |
| Arduino Uno pins | A4 = SDA, A5 = SCL |
How do you wire two I2C sensors to an Arduino Uno?
Both devices share the same A4/SDA and A5/SCL lines — you don't wire I2C devices in series or give each one its own pins, you connect them in parallel and let their addresses tell them apart. Soldr's example session paired an AHT25 temperature/humidity sensor with a 16x2 character LCD on an I2C backpack, both sharing A4/A5 as long as their addresses differ.
| Signal | Uno Pin | Notes |
|---|---|---|
| SDA | A4 | shared by every I2C device on the bus |
| SCL | A5 | shared by every I2C device on the bus |
| GND | GND | must be common to all devices |
| VCC | 5V (or 3.3V per module) | check each module's rated voltage |
Install the library for each I2C part from the Arduino Library Manager, then run an I2C scanner before wiring code around a guessed address — LCD backpack addresses in particular vary by batch. This is the setup portion of the actual scanner Soldr generated for the Uno:
#include <Wire.h>
#define SOLDR_DEBUG 1
void setup() {
Serial.begin(115200);
Wire.begin();
Serial.println("[SOLDR] I2C scanner | board:Arduino Uno R3 | v1.0");
Serial.println("[INIT] I2C bus: OK");
byte found = 0;
for (byte addr = 1; addr < 127; addr++) {
Wire.beginTransmission(addr);
if (Wire.endTransmission() == 0) {
Serial.print("Found device at 0x");
Serial.println(addr, HEX);
found++;
}
}
Serial.print("Total devices found: ");
Serial.println(found);
}
void loop() {}
The scan loop above is the standard Arduino I2C-scan pattern (probe every address 1–126 and report which ones acknowledge); Soldr's session generated the setup and the scanner call, and this is the well-known loop that pattern always uses. Open Serial Monitor at 115200 baud and you should see one address for each device — if nothing appears, check for swapped SDA/SCL or a missing ground connection before suspecting the sensor itself.
Why does my I2C device not show up on the scanner?
The two most common causes, in order: SDA and SCL are swapped, or the ground isn't actually shared between the boards. Both fail the exact same way — the scanner reports zero devices — so check wiring before assuming a dead part. A less common third cause is an address collision: two devices sharing one hard-coded address will corrupt each other's responses even though each works fine alone.
What do you need to try this yourself?
The exact two-part setup from Soldr's session: an Uno R3 CH340G ATmega328P Board (Rs.230) as the controller, and an AHT25 Temperature & Humidity Sensor (Rs.130) as your first I2C device. If you want the two-device bus exactly as demonstrated, add a 16x2 Character LCD (Rs.150) with an I2C Backpack (PCF8574) (Rs.85) — Soldr's session described these as one pre-soldered module, but they ship as two separate parts in the current catalog; buy both if you want the combo it described.
Frequently asked questions
I2C mein kitne wires lagte hain?
Sirf do signal wires — SDA (data) aur SCL (clock) — plus ek shared ground. Yehi wajah hai ki I2C ko "two-wire" protocol kehte hain, jabki SPI mein har device ke liye alag chip-select line chahiye hoti hai.
How many devices can share one I2C bus?
In practice, as many as have distinct addresses — most 7-bit I2C addressing allows up to 112 usable addresses after reserved ranges. The real-world limit is usually bus capacitance and cable length, not the address space; keep wires short for a reliable bus with several devices.
What is the price of an Arduino Uno and an I2C sensor to start learning I2C in India?
The exact starter pair from this guide costs Rs.360 total: an Uno R3 CH340G board (Rs.230) plus an AHT25 temperature/humidity sensor (Rs.130), both in stock at Compoden with cash on delivery available across India. Prices checked 11 August 2026.
Do I need external pull-up resistors for I2C?
Usually not — most breakout modules already carry pull-up resistors on SDA and SCL. If you're wiring a bare I2C chip with no breakout board, or the bus is unreliable with several devices attached, add external 4.7kΩ pull-ups from SDA and SCL to VCC.