I2C is specified to need a pull-up resistor on each of its two bus lines. Why does the bus depend on them, and why does the four-wire BME280 breadboard setup work without adding any?
I2C outputs are open-drain: a device can only pull SDA or SCL low or let it float, never drive it high — a pull-up to 3.3 V has to supply the high level. The wiring works without extra parts because the breakout board already carries pull-ups on both lines.
* Every device may only pull the line down; the resistor is the only thing that ever pulls it up. *
The trick that lets many devices share two wires is that nobody is allowed to drive them high. Each chip's bus pin is open-drain: it either connects the line to GND (a 0) or disconnects itself (lets the line float). The pull-up resistor then brings the idle line up to 3.3 V — exactly the job the pull-up did for the button input, applied to a bus.
This one-sided rule is what makes sharing safe and useful:
- No fights. If one chip drove the line high while another pulled it low, a near-short current would flow through both. With open-drain, the worst that happens is the line reads 0.
- Any device can signal. A sensor acknowledges a byte (ACK) by pulling SDA low, and a slow device can even hold SCL low to stall the master (clock stretching) — possible only because "low" always wins over the resistor.
Without the pull-ups both lines would float and no transfer could even start. The reason the breadboard circuit still needs no resistors: breakout modules place them next to the sensor (on the order of 10 kΩ to the supply), so wiring power, ground, SCL and SDA is genuinely all there is to do. The flip side: every breakout on the bus adds its resistors in parallel, so a bus with several boards can end up with too strong a pull for the drivers — one reason large I2C setups remove pull-ups or use a bare chip.
Go deeper:
TI application note — I2C bus pull-up resistor calculation — how the resistor value trades rise time against drive current, with the formulas.
Wikipedia — Open collector — open-drain outputs, wired-AND lines and why shared buses use them.