I2C vs SPI vs UART — Which One Should You Actually Use?
The answer depends on what you're connecting, how fast you need it, and how many wires you can afford.
Every microcontroller project eventually hits the communication protocol question. Your sensor needs to talk to your microcontroller. The module you want to add uses SPI. Your GPS module wants UART. Why do they all use different things, and does it matter which you choose?
It does matter, but less than most beginners think. Here's what actually determines the choice.
UART — Simple, Slow, Point-to-Point
UART (Universal Asynchronous Receiver-Transmitter) is the simplest. Two wires: TX and RX. No clock wire — sender and receiver must agree on baud rate beforehand. Point-to-point only — you can't put multiple devices on the same UART bus.
Use UART when: you're connecting two devices directly (ESP32 to GPS, Arduino to Bluetooth module), you need the simplest possible wiring, or the device you're using only supports UART. It's also the easiest to debug — you can read UART data with any serial monitor.
- Two wires (TX, RX) — very simple wiring
- Point-to-point only — one device per UART port
- Must configure matching baud rate on both sides
- Common baud rates: 9600, 115200, 460800
- Good for: GPS, Bluetooth modules, debug output, simple module communication
I2C — Multi-Device, Slow, Medium Complexity
I2C uses two wires (SDA and SCL) and supports multiple devices on the same bus. Each device has an address. The controller sends the address first, then communicates with that specific device. This is why you can put an accelerometer, a temperature sensor, and an OLED display all on two wires.
The limitation is speed — I2C standard mode is 100kHz, fast mode is 400kHz. For sensors this is usually fine. For data-intensive applications (high-res displays, fast ADCs) it's too slow.
I2C also has an address conflict problem — if two devices have the same I2C address and it's not configurable, you can't use them on the same bus. This catches beginners by surprise, especially with identical OLED displays or sensor breakouts.
I2C is the right choice when you have many sensors and few spare pins. It's the wrong choice when you need high throughput.
SPI — Fast, More Wires, One Device per CS Pin

SPI uses four wires (MOSI, MISO, SCK, CS) plus an additional CS (Chip Select) pin for each device. It's faster than I2C — typical speeds are 1–80MHz depending on the device. This makes it the right choice for displays, SD cards, and anything that needs to move data quickly.
The downside is pin count. Each additional SPI device requires another CS pin. With four devices, you're using seven pins just for communication. On an ATmega328 with limited I/O, this is significant.
The Practical Decision
Most of the time, the choice is made for you by the device you're using — the sensor or module supports what it supports. When you have a choice, use I2C for sensors and slow peripherals (fewer pins), use SPI for displays and high-speed data (more pins but faster), and use UART for simple device-to-device communication.
Design your interface the right way
Circuit Breaker helps you plan communication buses, check pin assignments, and catch interface mismatches before you solder.
More from the blog
RoboDIB
Solve these problems yourself
AI inventory, component map, 3D printing, and circuit design tools — all built for India's maker community.