How I2C Talks on Two Wires
SDA, SCL, and device addresses explained.
How I2C Talks on Two Wires is a free Arduino & IoT Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Arduino & IoT Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Two Wires, Many Devices
I2C lets many chips share just two wires, so you can add sensors and screens without running out of pins. 🔌
Meet SDA and SCL
I2C uses two lines: SDA carries the data, and SCL carries the clock pulses that keep both sides perfectly in step.
The Clock Keeps Time
The SCL clock line ticks like a metronome. Every tick tells devices exactly when to read the next bit on the data line.
Master and Slaves
Your Arduino is the master: it starts every conversation. Sensors and displays are slaves that only answer when called.
Every Device Has an Address
Each chip on the bus owns a unique address, usually a 7-bit number. The master uses it to talk to exactly one device. 📬
How a Message Begins
The master sends a start signal, then the target address. The matching device replies, and the rest stay quiet on the shared lines.
Pull-Up Resistors Are Required
I2C lines need pull-up resistors to 3.3V or 5V. Without them the bus floats and your devices simply will not respond.
Boards on the Uno
On an Arduino Uno, SDA is pin A4 and SCL is pin A5. Many breakout boards include their own pull-ups already.
The Wire Library
Arduino talks I2C through the built-in Wire library. One include line gives you everything you need to start communicating.
#include <Wire.h>Begin the Bus
Call Wire.begin() in setup to join the bus as master. After that you can send to any device by its address.
void setup() {
Wire.begin();
}Why I2C Wins
Because devices share two lines, I2C keeps wiring simple and your pins free. That is why so many modules use it.
Quick Check
Which two lines does I2C use to communicate?
Recap
You learned that I2C shares two wires, SDA and SCL, with a master, addressed slaves, and pull-ups. Two wires, many devices. ✅
Frequently asked questions
Is the “How I2C Talks on Two Wires” lesson free?
Yes — the full text of “How I2C Talks on Two Wires” is free to read here on the web, and the Arduino & IoT Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Arduino & IoT Academy course, upgrade to CoddyKit PRO.
What will I learn in “How I2C Talks on Two Wires”?
SDA, SCL, and device addresses explained. You practise Arduino & IoT Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Arduino & IoT Academy?
No prior experience is required. Arduino & IoT Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “How I2C Talks on Two Wires” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Arduino & IoT Academy lesson?
Yes. Every Arduino & IoT Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- How I2C Talks on Two Wires
- Scan for I2C Addresses
- How SPI Moves Data Fast
- Run Several Devices on One Bus