BME280

A Bosch BME280 breakout that measures barometric pressure, temperature, and relative humidity on one small board, talking to a microcontroller over I2C or SPI.

  • Chip supply (VDD)1.71 V to 3.6 V
  • Interface supply (VDDIO)1.2 V to 3.6 V
  • InterfacesI2C up to 3.4 MHz, SPI (3 and 4 wire) up to 10 MHz
  • I2C address0x76 (SDO to GND) or 0x77 (SDO to VDDIO)
BME280, A Bosch BME280 breakout that measures barometric pressure, temperature, and relative humidity on one small board, talking to a microcontroller over I2C or SPI.
In short

The BME280 is Bosch's combined pressure, humidity and temperature sensor: the chip runs from 1.71 V to 3.6 V and talks I2C (up to 3.4 MHz) or SPI (up to 10 MHz) (Bosch BME280 datasheet rev 1.24, p. 2). Its I2C address is 0x76 with SDO to GND or 0x77 with SDO to VDDIO, and CSB must sit high for I2C (datasheet, p. 32). The GY-BME280 breakout adds a 3.3 V regulator and I2C pull-ups, so you wire VCC, GND, SDA and SCL to your board and read it with a library such as Adafruit_BME280.

The BME280 is Bosch's combined environmental sensor. A single 2.5 × 2.5 mm package reports barometric pressure across 300 to 1100 hPa, temperature from -40 to +85 °C, and relative humidity from 0 to 100 % (Bosch datasheet, p. 2). It is the humidity-capable member of the family: the closely related BMP280 measures only pressure and temperature, and Bosch lists the BME280 as register and performance compatible with it. The breakout adds an onboard 3.3 V regulator, so the board can be powered from 3.3 V or 5 V even though the chip itself is limited to 3.6 V.

Accuracy is strong for the size and price. Absolute pressure accuracy is ±1.0 hPa from 0 to 65 °C, and relative pressure accuracy is ±0.12 hPa (about ±1 m of altitude) between 700 and 900 hPa, which is why it shows up in altimeters and forecasting projects. Humidity is specified to ±3 % RH (20 to 80 % RH at 25 °C) and temperature to ±0.5 °C at 25 °C. With all three channels sampled once a second it draws 3.6 µA, and 0.1 µA in sleep (datasheet, pp. 2, 9 to 12).

The BME280 speaks I2C (up to 3.4 MHz) or SPI (up to 10 MHz). Over I2C the address is 0x76 with SDO low and 0x77 with SDO high, so two sensors can share one bus. The chip stores factory calibration coefficients that must be read and applied to the raw output, so a library such as Adafruit_BME280 is the normal way to get compensated readings.

BME280 pinout

tinkered.ai/components/bme280BME280VCCPowerGNDGroundSCLI2C SCL · SPI SCKSDAI2C SDA · SPI SDICSBDigital · SPI CSSDODigital · SPI SDO
PinFunctionType
VCCVCC (3.3-5V)3.3 V (max 5 V)power in
GNDGNDpower in
SCLI2C SCL, SPI SCKbidirectional
SDAI2C SDA, SPI SDIbidirectional
CSBDigital, SPI CSinput
SDODigital, SPI SDOinput

How to wire the BME280

Pin by pin, for the board you have.

BME280Arduino UnoNote
VCC5V
GNDGND
SCLSCL
SDASDA
CSB3V3
  • This wiring is for a breakout with a regulator (a 3-pin part beside the chip, as on the 5 V GY-BME280), which shifts only SDA and SCL: CSB goes to 3.3V, since no interface pin may exceed VDDIO + 0.3 V. A board without a regulator is 3.3 V only: wire VCC to 3.3V too, since the chip's absolute maximum is 4.25 V (Bosch BME280 datasheet).
Open this circuit on an Arduino UnoThe full Arduino Uno guide

BME280 code

Every example here compiles for its board.

Libraries: adafruit/Adafruit BME280 Library
// BME280 on Arduino Uno: wiring and a free simulation at https://www.tinkered.ai/components/bme280
#include <Wire.h>
#include <Adafruit_BME280.h>

Adafruit_BME280 bme;

void setup() {
  Serial.begin(9600);
  if (!bme.begin(0x76)) {            // 0x77 if SDO is tied HIGH
    Serial.println("BME280 not found");
    while (1) delay(10);
  }
}

void loop() {
  Serial.print(bme.readTemperature()); Serial.print(" C  ");
  Serial.print(bme.readHumidity());    Serial.print(" %  ");
  Serial.print(bme.readPressure() / 100.0); Serial.println(" hPa");
  delay(1000);
}
Compiled for arduino:avr:uno on 2026-10-30

Before you wire it

Do
  • The GY-BM E/P module has on-board SDA/SCL pull-ups: do not add external ones.
  • CSB must be tied HIGH (to VCC) to select I2C mode; left floating it may enter SPI
  • SDO selects the I2C address. Leave it UNCONNECTED for the default 0x76 (the GY-BM E/P board has an on-board pull-down); only tie SDO to VCC for 0x77. Do not wire SDO to GND: it is the same as floating but trips a needless "bidirectional pin on a power net" pin-conflict warning.
  • 3.3-5V tolerant (on-board regulator + level shifting on GY-BM E/P); 5V is fine
Don’t
  • No leaving CSB floating: tie to VCC or the sensor may not answer on I2C
  • No external I2C pull-up resistors: the module already has them on-board
  • No expecting the raw registers to read in °C/%/hPa: the library applies the Bosch calibration; always read via Adafruit_BME280 (or equivalent)
  • Power the breakout's VCC from 3.3 V or 5 V and connect GND to ground; the onboard regulator feeds the sensor die, which itself is rated 1.71 V to 3.6 V.
  • For I2C, wire SDA and SCL to the board's I2C pins. The GY-BME280 module already has I2C pull-ups, so no external resistors are needed.
  • CSB selects the interface: tied to VDDIO the chip answers on I2C, and once CSB is pulled low the I2C interface stays off until the next power-on reset (Bosch datasheet, p. 32). Tie CSB high for I2C.
  • SDO sets the I2C address: low for 0x76, high for 0x77. The bare chip's SDO must not float (datasheet, p. 33); the module holds it low for 0x76, so tie it to VCC only when you want 0x77.
  • For SPI, use SCK (SCL), SDI (SDA), SDO and CSB in 4-wire mode; CSB is active low.
  • The raw output is meaningless until the on-chip calibration coefficients are read and the compensation formulas are applied; a driver library handles this.
  • Bosch notes the temperature reading includes PCB heat and sensor self-heating and is typically above ambient (datasheet, p. 12), so sample slowly or use forced mode for room temperature.

Specifications

Chip supply (VDD)
1.71 V to 3.6 VBosch BME280 datasheet rev 1.24, p. 2
Interface supply (VDDIO)
1.2 V to 3.6 VBosch BME280 datasheet rev 1.24, p. 2
Interfaces
I2C up to 3.4 MHz, SPI (3 and 4 wire) up to 10 MHzBosch BME280 datasheet rev 1.24, p. 2
I2C address
0x76 (SDO to GND) or 0x77 (SDO to VDDIO)Bosch BME280 datasheet rev 1.24, p. 32
Chip ID
0x60 (register 0xD0)Bosch BME280 datasheet rev 1.24, p. 27
Pressure range and accuracy
300 to 1100 hPa, ±1.0 hPa absolute (0 to 65 °C), ±0.12 hPa relativeBosch BME280 datasheet rev 1.24, p. 11
Humidity accuracy
±3 % RH (20 to 80 % RH, 25 °C), 1 s response timeBosch BME280 datasheet rev 1.24, pp. 2, 9
Temperature accuracy
±0.5 °C at 25 °C, range -40 to +85 °CBosch BME280 datasheet rev 1.24, p. 12
Current draw
3.6 µA at 1 Hz (all three channels), 0.1 µA in sleepBosch BME280 datasheet rev 1.24, p. 2
Supply voltage
3.3 V
Maximum supply voltage
5 V
Interface
I2C
On-board I2C pull-ups
Yes (10 kΩ)
Dimensions
15.5 × 11.5 × 5.1 mm
Weight
3 g

From the maker's datasheet.

Common mistakes

  1. Assuming the wrong I2C address

    Many tutorials hard-code 0x77, but this board defaults to 0x76 because its SDO is held low. If the device is not found, try the other address or run an I2C scanner before assuming the wiring is bad.

  2. Confusing the BME280 with the BMP280

    The two boards look nearly identical, but the BMP280 has no humidity sensor. The BME280 reports chip ID 0x60 in register 0xD0 (Bosch datasheet, p. 27); a BMP280 reports 0x58, which is why a library can refuse the board or humidity reads zero.

  3. Reading raw registers without compensation

    Pulling raw values straight from the data registers gives numbers that look nothing like real pressure or temperature. The factory calibration coefficients must be read and applied first, which is why a driver library is strongly recommended.

  4. Leaving CSB floating or pulsing it low

    The chip switches to SPI the moment CSB is pulled low and keeps I2C disabled until power is cycled (Bosch datasheet, p. 32). Tie CSB to VCC when you use I2C.

  5. Feeding 5 V to a bare 3.3 V module

    The BME280 chip is rated up to 3.6 V. Regulated breakouts like this one accept 5 V on VCC, but some BME280 boards have no regulator and are damaged by 5 V, so confirm which board you have before wiring.

BME280 questions

What is the BME280's I2C address?

It is 0x76 when SDO is connected to GND and 0x77 when SDO is connected to VDDIO (Bosch BME280 datasheet, p. 32). The GY-BME280 module holds SDO low, so it answers at 0x76 unless you tie SDO to VCC. Two sensors can share one bus by giving them different SDO levels.

BME280 vs BMP280: what is the difference?

The BME280 adds a humidity sensor; the BMP280 measures only pressure and temperature. Bosch lists the BME280 as register and performance compatible with the BMP280 (datasheet, p. 2), and you can tell them apart by the chip ID in register 0xD0: 0x60 for the BME280 (p. 27), 0x58 for the BMP280.

Can I use the BME280 with a 5 V Arduino?

Yes, if your breakout has a regulator, as the 5 V version of the GY-BME280 does: power VCC from 5 V and the regulator feeds the chip. The 3.3 V version has none and must run from 3.3 V. The bare chip is limited to 3.6 V on VDD and VDDIO (Bosch datasheet, p. 2), so a board without a regulator must run from 3.3 V.

Can I use the BME280 with an ESP32 or Raspberry Pi Pico?

Yes. Power the module from 3.3 V, wire SDA and SCL to the board's I2C pins and tie CSB high. The chip's 1.2 V to 3.6 V interface range (Bosch datasheet, p. 2) matches 3.3 V logic directly.

Why does my BME280 say 'sensor not found'?

Usually the address is wrong: try 0x76 and 0x77, or run an I2C scanner. Then check that CSB is tied high, since a CSB pulled low switches the chip to SPI until it is power-cycled (Bosch datasheet, p. 32), and that SDA and SCL are not swapped. If the scanner finds the board but the library rejects it, it may be a BMP280.

Why does my BME280 read a few degrees too warm?

Bosch notes the temperature reading includes PCB heat and sensor self-heating and is typically above ambient (datasheet, p. 12). Use forced mode or a slow sampling rate, and keep the board away from regulators and the microcontroller.

How accurate is the BME280 as an altimeter?

Relative pressure accuracy is ±0.12 hPa between 700 and 900 hPa at 25 to 40 °C (Bosch datasheet, p. 11), roughly ±1 m of altitude, and pressure noise is 0.2 Pa, equal to 1.7 cm (p. 2). Absolute pressure is ±1.0 hPa, so set the sea-level reference from a local weather report for true altitude.

Build something with the BME280

  • Desktop weather station

    Log temperature, humidity, and pressure and show them on an OLED or LCD, updating live as conditions change.

    Build this
  • Barometric altimeter

    Use the sensor's fine relative-pressure resolution to track altitude changes of roughly a meter for drones, rockets, or hiking gadgets.

    Build this
  • Indoor climate and comfort monitor

    Watch room humidity and temperature to flag condensation risk or trigger a fan or dehumidifier.

    Build this
  • IoT environmental logger

    Pair with an ESP32 or ESP8266 to stream readings to a dashboard or cloud service for long-term trend tracking.

    Build this
  • Simple weather forecaster

    Track the pressure trend over time to predict improving or worsening weather with a rising-or-falling indicator.

    Build this
For AI assistants

This page as plain Markdown, for ChatGPT, Claude or your own agent. /components/bme280.md

What will you build with it?