Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Electronics Fundamentals
  4. ›I2C Explained
Step 11 of 16 in Arduino from zeroPart of a learning path.
Next

Concept explainer · Intermediate · 4 min read

I2C Explained

Wiring, Pull-ups, Addresses and Troubleshooting

By Geekobot Learning Team · Updated 24 Oct 2026

On this page
Short answerHow I2C worksDefault I2C pins on popular boardsCommon I2C addresses (and conflicts)Find your device with an I2C scannerMixing 3.3 V and 5 V devices on I2CI2C vs SPI vs UARTTry itCommon mistakesFAQsParts and next steps
Short answer

I2C is a two-wire bus that lets one microcontroller talk to many sensors and displays using a data line (SDA) and a clock line (SCL). Every device has a 7-bit address, both lines need pull-up resistors (typically 4.7 kΩ at 100 kHz), and all devices must share a ground. An I2C scanner sketch finds the address of anything connected.

Key specs at a glance

Wires
SDA (data), SCL (clock), plus GND and power
Addressing
7-bit, up to 112 usable addresses
Speeds
100 kHz standard, 400 kHz fast, 1 MHz fast-mode plus
Pull-ups
4.7 kΩ typical at 100 kHz; 2.2 kΩ for 400 kHz or longer wires
Line type
Open-drain: devices only pull low
Practical length
Under about 1 m on hobby boards without bus extenders
!Safety: Lithium cells need care

A shorted, over-charged or damaged lithium cell can get very hot and catch fire. Use a protection board or BMS, never short the terminals, charge on a non-flammable surface and do not leave a charging pack alone. Throw away cells that are swollen or dented.

01

How I2C works

The controller (your Arduino, ESP32 or Pico) drives the clock and starts every conversation by sending a device address. Only the device with that address answers. Because devices can only pull the lines low, pull-up resistors return them to high between bits. That is why I2C works with many devices on the same two wires, and also why missing pull-ups are the most common I2C fault.

Most breakout modules already include 4.7 kΩ or 10 kΩ pull-ups. With several modules connected, their pull-ups combine in parallel; if the total drops below about 1 kΩ, some devices cannot pull the line low enough.

02

Default I2C pins on popular boards

BoardSDASCLNotes
Arduino Uno / NanoA4A5Also on the two pins beside AREF (Uno R3)
Arduino Mega2021
ESP32 DevKitGPIO 21GPIO 22Remappable with Wire.begin(sda, scl)
ESP8266 NodeMCUD2 (GPIO 4)D1 (GPIO 5)
Raspberry Pi PicoGP4GP5I2C0 default; many other pin pairs work
Raspberry Pi 4/5GPIO 2 (pin 3)GPIO 3 (pin 5)1.8 kΩ pull-ups on board
Arduino Uno / Nano
SDA:
A4
SCL:
A5
Notes:
Also on the two pins beside AREF (Uno R3)
Arduino Mega
SDA:
20
SCL:
21
ESP32 DevKit
SDA:
GPIO 21
SCL:
GPIO 22
Notes:
Remappable with Wire.begin(sda, scl)
ESP8266 NodeMCU
SDA:
D2 (GPIO 4)
SCL:
D1 (GPIO 5)
Raspberry Pi Pico
SDA:
GP4
SCL:
GP5
Notes:
I2C0 default; many other pin pairs work
Raspberry Pi 4/5
SDA:
GPIO 2 (pin 3)
SCL:
GPIO 3 (pin 5)
Notes:
1.8 kΩ pull-ups on board
03

Common I2C addresses (and conflicts)

Two devices with the same address cannot share a bus. Many modules let you change the address with a solder jumper or pin; otherwise use a TCA9548A multiplexer or a second I2C bus.

ModuleAddress(es)Watch out for
SSD1306 OLED0x3C (sometimes 0x3D)
PCF8574 LCD backpack0x27 (PCF8574) or 0x3F (PCF8574A)Try both if the screen stays blank
MPU6050 IMU0x68, or 0x69 with AD0 highClashes with DS3231 RTC
DS3231 RTC0x68 (+ 0x57 EEPROM)Clashes with MPU6050
BMP280 / BME2800x76 or 0x77
PCA9685 servo driver0x40 to 0x7FClashes with INA219 at 0x40
INA219 current sensor0x40 to 0x4F
ADS1115 ADC0x48 to 0x4B
SSD1306 OLED
Address(es):
0x3C (sometimes 0x3D)
PCF8574 LCD backpack
Address(es):
0x27 (PCF8574) or 0x3F (PCF8574A)
Watch out for:
Try both if the screen stays blank
MPU6050 IMU
Address(es):
0x68, or 0x69 with AD0 high
Watch out for:
Clashes with DS3231 RTC
DS3231 RTC
Address(es):
0x68 (+ 0x57 EEPROM)
Watch out for:
Clashes with MPU6050
BMP280 / BME280
Address(es):
0x76 or 0x77
PCA9685 servo driver
Address(es):
0x40 to 0x7F
Watch out for:
Clashes with INA219 at 0x40
INA219 current sensor
Address(es):
0x40 to 0x4F
ADS1115 ADC
Address(es):
0x48 to 0x4B
04

Find your device with an I2C scanner

Upload this sketch, open the Serial Monitor at 115200 baud, and it lists every address that responds. If nothing is found, check wiring, power and pull-ups before suspecting the library.

I2C scanner (Arduino, ESP32, Pico) · Arduino C++Verify & upload in Electrolark
#include <Wire.h>

void setup() {
  Serial.begin(115200);
  Wire.begin();               // ESP32: Wire.begin(21, 22);
  Serial.println("Scanning...");
  for (byte addr = 1; addr < 127; addr++) {
    Wire.beginTransmission(addr);
    if (Wire.endTransmission() == 0) {
      Serial.print("Found device at 0x");
      Serial.println(addr, HEX);
    }
  }
}

void loop() {}
05

Mixing 3.3 V and 5 V devices on I2C

If a 5 V module has pull-ups to 5 V and you connect it to a 3.3 V ESP32 or Pico, the bus idles at 5 V and stresses the 3.3 V pins. Either remove or re-route the module's pull-ups to 3.3 V, or use a bidirectional BSS138 level shifter designed for I2C.

06

I2C vs SPI vs UART

I2CSPIUART
Wires2 (shared)4 + one CS per device2 per device (TX/RX)
Typical speed100 to 400 kHz1 to 80 MHz9600 to 115200 baud
Devices per busMany, by addressMany, by chip-select pinOne
Best forSensors, small OLEDs, RTCsFast displays, SD cardsGPS, Bluetooth, debug output
Wires
I2C:
2 (shared)
SPI:
4 + one CS per device
UART:
2 per device (TX/RX)
Typical speed
I2C:
100 to 400 kHz
SPI:
1 to 80 MHz
UART:
9600 to 115200 baud
Devices per bus
I2C:
Many, by address
SPI:
Many, by chip-select pin
UART:
One
Best for
I2C:
Sensors, small OLEDs, RTCs
SPI:
Fast displays, SD cards
UART:
GPS, Bluetooth, debug output
07

Try it: I2C pull-up calculator

Change the values and the diagram and results update as you type.

08

Common mistakes to avoid

  • !Swapping SDA and SCL. Nothing is damaged, but nothing responds.
  • !Running without pull-ups, or with too many modules' pull-ups in parallel.
  • !Using long jumper wires or flat cable at 400 kHz; drop to 100 kHz or shorten the bus.
  • !Two modules with the same address, such as an MPU6050 and a DS3231 at 0x68.
  • !Forgetting a shared ground between boards powered from different supplies.
09

Frequently asked questions

What pull-up resistor value should I use for I2C?

4.7 kΩ to 3.3 V or 5 V suits most hobby buses at 100 kHz. Use 2.2 kΩ for 400 kHz or longer wires. Check whether your modules already include pull-ups before adding more.

How many devices can I connect to I2C?

Up to 112 addresses in theory. In practice the limit is bus capacitance (400 pF) and address clashes, so a few to a dozen modules on short wires is typical.

Is I2C the same as IIC or TWI?

Yes. IIC is another way of writing I2C, and TWI (Two-Wire Interface) is the name Microchip/Atmel uses for compatible hardware.

Why does my I2C scanner find no devices?

Check power to the module, the shared ground, SDA/SCL orientation and the pins your board uses. Then confirm pull-ups exist; a missing pull-up is the most common cause.

How long can I2C wires be?

I2C was designed for on-board use. Up to about 1 m works with good pull-ups at 100 kHz. For longer runs use a differential extender such as the P82B715 or switch to RS485 or CAN.

Parts for this guide

  • 4-Channel Logic Level Converter (BSS138)
    ₹20View
  • DS3231 Precision RTC Module with EEPROM
    ₹269View
  • LCD1602 16x2 Character LCD Display
    ₹109View
  • Resistor Assortment Kit (30 Values)
    ₹33View
Shop Interface ModulesShop Motion & Position Sensors

Calculators

I2C pull-up calculator

Terms in this guide

I2CInter-Integrated Circuit: a two-wire bus (SDA and SCL) that connects many devices by address.Pull-up resistorA resistor from a signal line to the supply that keeps the line high when nothing pulls it low.Open-drainAn output that can only pull a line low; a pull-up resistor makes it high. Used by I2C.SPISerial Peripheral Interface: a fast bus with clock, data in, data out and a chip-select line per device.UARTUniversal asynchronous receiver-transmitter: two-wire serial (TX and RX) used by GPS, Bluetooth modules and debug output.Logic levelThe voltage that represents a digital high: 5 V on classic Arduinos, 3.3 V on ESP32, Pico and Raspberry Pi.

Keep learning

How-toIntermediate3.3 V vs 5 V LogicYou need level shifting when a 5 V device sends signals to a 3.3 V board such as an ESP32 or Raspberry Pi Pico, because 5 V on their pins can damage them.4 min read · Prototyping & WiringHow-toBeginnerSSD1306 OLED DisplayThe SSD1306 is the driver chip in most small monochrome OLED displays, such as the popular 0.96 inch 128x64 module.3 min read · Displays & LEDsHow-toBeginner16x2 LCD with I2CA 16x2 LCD shows two lines of 16 characters using the HD44780 controller.3 min read · Displays & LEDsComponent guideIntermediateMPU6050 Accelerometer and GyroscopeThe MPU6050 is a 6-axis motion sensor that combines a 3-axis accelerometer and a 3-axis gyroscope on one chip and talks over I2C at address 0x68.3 min read · SensorsComponent guideBeginnerResistors ExplainedWhat resistors do, how to read 4- and 5-band colour codes and SMD codes, Ohm's law, power ratings, standard values and uses: LEDs, pull-ups, dividers.4 min read · Passive Components

Sources

  • UM10204 I2C-bus specification and user manual (NXP Semiconductors)
  • Arduino Wire library reference (Arduino)

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerHow I2C worksDefault I2C pins on popular boardsCommon I2C addresses (and conflicts)Find your device with an I2C scannerMixing 3.3 V and 5 V devices on I2CI2C vs SPI vs UARTTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide4 items · ₹431

4-Channel Logic Level Converter (BSS138) · DS3231 Precision RTC Module with EEPROM · LCD1602 16x2 Character LCD Display · Resistor Assortment Kit (30 Values)

Run itChange the inputs and watch the output
Serial monitor115200 baud
Scanning...
Found device at 0x27
Found device at 0x3C

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question