Blog
ESP32 BME280: Pressure, I2C, Fixes
The BME280 is the cheapest way to get real temperature, humidity, and pressure on an ESP32 — and most setup problems are one wrong I2C address. Wiring, the address mess, and the fixes.
How Much Atmospheric Pressure Can ESP32 Handle?
The ESP32 doesn’t measure pressure — the sensor does. A BME280 covers 300-1100 hPa, from Mount Everest to below sea level, so every place you’ll ever deploy a board is inside that range. Sea level is about 1013 hPa; your sensor reads 980-1030 anywhere normal people live.
How Much Pressure Can ESP32 Handle?
As a chip question, any atmosphere a human survives is trivial — no sensing element, no sealed chamber to burst. With a BME280 attached you measure the full barometric range. What the search usually means is weather survival, and the answer is: in an enclosure, yes.
How to Use BME680 on ESP32?
Same I2C wiring as the BME280 — VCC→3V3, GND→GND, SDA and SCL to the bus — plus one extra step: the gas sensor needs the Bosch BSEC library to turn raw VOC readings into an IAQ index. BSEC is closed-source, free for non-commercial use, and it’s the only way to get the gas reading.
How to Connect BME280 to ESP32?
Four wires on I2C: VCC→3V3, GND→GND, SDA→GPIO21, SCL→GPIO22 — the default Wire pins on classic ESP32 boards. SPI works but buys nothing for one sensor. Power it at 3V3, not 5V; the logic level is 3.3V either way.
Why does my BME280 return zeros for everything?
The address, nine times out of ten. My breakout answered at 0x76 while the Adafruit library’s default expects 0x77 — an I2C scanner found it in ten seconds and setI2CAddress(0x76) fixed the rest. If the address is right, check SDA/SCL swapped, then pull-ups: the ESP32’s internal pulls are weak and some modules ship without any. The debugging FAQ walks the scan.
Is my BME280 at 0x76 or 0x77?
Look at the SDO pin: tied low gives 0x76, tied high gives 0x77. Chinese modules usually solder SDO to GND (0x76); Adafruit-style boards default to 0x77. Can’t see the board? Run an I2C scanner — it prints every address that answers.
Which library should I use for BME280?
Adafruit BME280 Library is the fastest path and matches most tutorials; the Bosch driver is the bare-metal option. Both deliver temperature, humidity, and pressure in hPa — the chip stores its calibration data internally and the library applies it automatically.
Why does my pressure disagree with the weather app?
Altitude, plus station vs sea-level pressure. Weather apps report sea-level pressure; your sensor reports absolute pressure at your desk, which drops ~1 hPa per 8-9 meters of altitude — a 300m city means a ~35 hPa gap that looks like a broken sensor. Subtract a fixed offset you calibrate once.
Can I connect multiple BME280s to one ESP32?
Two of them, easily: strap one SDO high and one low and they sit at 0x77 and 0x76 on the same bus. More than two needs a TCA9548A multiplexer — the right tool once you’re past two of anything. The simulator is a decent place to test a two-address setup first.
BME280 or BME680 — which should I use?
BME280 if you want humidity and pressure; BME680 if you want the gas channel for air quality. The 680’s humidity is slightly worse, its IAQ needs the closed BSEC library, and it draws more current — the 280 is the boring, reliable weather-station pick. Pressure range is the same 300-1100 hPa on both.
Read a Pressure Sensor Right Now — In Your Browser
Closest runnable cousin of the BME280 lives in our free simulator — the BMP280 on ESP32, same I2C family, same driver pattern, minus the humidity channel:
BMP280 ready!
Temp: 24.35 C Pressure: 1013.25 hPa Altitude: 0.0 m
Three computed values from one tiny sensor — temperature raw, pressure calibrated, altitude derived from the pressure curve. Miswire it and you meet BMP280 not found! Check wiring., the I2C handshake failure that looks identical for the BME280. Run this, then swap in the BME280 on hardware and add the humidity line — the wiring and the debugging instincts transfer one-to-one.