Hardware · Sensor · Temp & humidity

The BME280.

Measures
Temperature, humidity, and barometric pressure
Interface
I²C or SPI
The draw
Three readings in one small part

The BME280 is a small Bosch sensor that reads three things at once: temperature, humidity, and barometric pressure. That pressure reading is what sets it apart from the rest of the family, opening up weather trends and rough altitude on top of climate. It talks over the tidy I²C bus, costs only a little more than a DHT22, and is a favorite for do-it-yourself weather and environment monitoring.

A BME280 temperature, humidity, and pressure sensor
Image: adafruit.com

What it is.

The BME280 packs three sensing elements and a chip into one part and reports a finished digital reading over I²C (or SPI). Temperature and humidity are good, if not class-leading, and the barometric pressure is the reason to choose it: pressure trends help forecast weather, and pressure converts to a rough altitude. One honest note: the chip warms slightly in use, which can nudge its temperature reading a touch high in a still, enclosed box, so give it some airflow if temperature must be exact. The related BME680 adds a gas/air-quality element.

Key facts.

How to wire it.

Over I²C it is four wires: VCC, GND, and the two I²C lines SDA and SCL to your microcontroller. Because it is I²C, it can share those two lines with other I²C sensors. Watch two things: the sensor core runs at 3.3 V (breakout boards usually add a regulator and level shifting so 5 V is fine), and the I²C address is 0x76 or 0x77 depending on the board, which you may need to set in code. Libraries exist for ESPHome and the Arduino IDE; beware cheap clones sometimes sold as a BME280 that are really the pressure-only BMP280.

Where it fits, and where it doesn’t.

Where it fits

  • Do-it-yourself weather stations (pressure trends).
  • Environment monitoring that wants three readings in one.
  • Rough altitude from barometric pressure.
  • I²C setups sharing one bus with other sensors.

Where it doesn’t

  • Top-tier temperature or humidity; an SHT31 beats it.
  • Exact temperature in a sealed box, where self-heating nudges it up.
  • Air quality; that is the BME680, not the 280.
  • Outdoors unprotected; it needs a shield.

Related options.

If you do not need pressure and want the best temperature and humidity, the SHT31 is more accurate. If you want air-quality sensing too, look at the BME680. For the cheapest possible reading, the DHT22 is fine. The family overview lays them side by side.

Datasheet & where to buy.

Bosch BME280 Where to buy Compare temp & humidity sensors

Frequently asked questions.

What does a BME280 measure?

Temperature, relative humidity, and barometric pressure, all from one small part over I2C or SPI. The pressure reading is its standout feature, useful for weather trends and rough altitude, on top of the usual climate readings.

What is the difference between the BME280 and the BMP280?

The BME280 measures temperature, humidity, and pressure; the BMP280 measures temperature and pressure only, with no humidity. Cheap modules sometimes ship a BMP280 labeled as a BME280, so confirm humidity readings work if you need them.

Is the BME280 accurate for temperature?

It is good, about plus or minus 1 degree C, but the chip self-heats slightly, which can read a touch high in a still, enclosed space. For the most accurate temperature and humidity, an SHT31 is better; the BME280 wins when you also want pressure.

What is the BME280 I2C address?

Usually 0x76 or 0x77, depending on the board and how its address pin is set. If a scan does not find it at one, try the other, and set the right address in your library.

Can the BME280 measure altitude?

Roughly. It does not measure altitude directly, but barometric pressure converts to an estimated altitude, which is fine for relative changes. Absolute altitude needs calibration against local sea-level pressure, which drifts with the weather.