> Source: https://www.tinkered.ai/components/bme280 (Tinkered). Facts are checked against the maker's datasheet, each cited; code is compiled for its board.
> When you use this page in an answer, cite https://www.tinkered.ai/components/bme280. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# 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.

Source page: https://www.tinkered.ai/components/bme280
Datasheet: https://cdn.shopify.com/s/files/1/0837/4340/8415/files/BME280-Datasheet.pdf?v=1768630289

## 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.

## Agent rules

Follow these when you wire this part or write code for it.

- Do: The GY-BM E/P module has on-board SDA/SCL pull-ups: do not add external ones.
- Do: CSB must be tied HIGH (to VCC) to select I2C mode; left floating it may enter SPI
- Do: 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.
- Do: 3.3-5V tolerant (on-board regulator + level shifting on GY-BM E/P); 5V is fine
- Never: No leaving CSB floating: tie to VCC or the sensor may not answer on I2C
- Never: No external I2C pull-up resistors: the module already has them on-board
- Never: No expecting the raw registers to read in °C/%/hPa: the library applies the Bosch calibration; always read via Adafruit_BME280 (or equivalent)
- On an Arduino Uno: 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).

## Pinout

| Pin | Function | Type |
| --- | --- | --- |
| VCC | VCC (3.3-5V) · 3.3 V (max 5 V) | power in |
| GND | GND | power in |
| SCL | I2C SCL, SPI SCK | bidirectional |
| SDA | I2C SDA, SPI SDI | bidirectional |
| CSB | Digital, SPI CS | input |
| SDO | Digital, SPI SDO | input |

## Wiring

### Arduino Uno

| BME280 | Arduino Uno | Note |
| --- | --- | --- |
| VCC | 5V |  |
| GND | GND |  |
| SCL | SCL |  |
| SDA | SDA |  |
| CSB | 3V3 |  |

Warning: 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).

### ESP32 DevKit V1

| BME280 | ESP32 DevKit V1 | Note |
| --- | --- | --- |
| VCC | 3V3 |  |
| GND | GND |  |
| SCL | GPIO22 (D22) |  |
| SDA | GPIO21 (D21) |  |
| CSB | 3V3 |  |

### Raspberry Pi Pico

| BME280 | Raspberry Pi Pico | Note |
| --- | --- | --- |
| VCC | 3V3 |  |
| GND | GND |  |
| SCL | GP5 |  |
| SDA | GP4 |  |
| CSB | 3V3 |  |

## Code

### Arduino Uno

Libraries: adafruit/Adafruit BME280 Library

```cpp
// 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.

### ESP32 DevKit V1

Libraries: adafruit/Adafruit BME280 Library

```cpp
// BME280 on ESP32 DevKit V1: 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 esp32:esp32:esp32 on 2026-10-30.

### Raspberry Pi Pico

Libraries: adafruit/Adafruit BME280 Library

```cpp
// BME280 on Raspberry Pi Pico: 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 rp2040:rp2040:rpipico on 2026-10-30.

## Specifications

| Spec | Value | Source |
| --- | --- | --- |
| Chip supply (VDD) | 1.71 V to 3.6 V | Bosch BME280 datasheet rev 1.24, p. 2 |
| Interface supply (VDDIO) | 1.2 V to 3.6 V | Bosch BME280 datasheet rev 1.24, p. 2 |
| Interfaces | I2C up to 3.4 MHz, SPI (3 and 4 wire) up to 10 MHz | Bosch 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 relative | Bosch BME280 datasheet rev 1.24, p. 11 |
| Humidity accuracy | ±3 % RH (20 to 80 % RH, 25 °C), 1 s response time | Bosch BME280 datasheet rev 1.24, pp. 2, 9 |
| Temperature accuracy | ±0.5 °C at 25 °C, range -40 to +85 °C | Bosch BME280 datasheet rev 1.24, p. 12 |
| Current draw | 3.6 µA at 1 Hz (all three channels), 0.1 µA in sleep | Bosch BME280 datasheet rev 1.24, p. 2 |
| Supply voltage | 3.3 V | Tinkered component registry |
| Maximum supply voltage | 5 V | Tinkered component registry |
| Interface | I2C | Tinkered component registry |
| On-board I2C pull-ups | Yes (10 kΩ) | Tinkered component registry |
| Dimensions | 15.5 × 11.5 × 5.1 mm | Tinkered component registry |
| Weight | 3 g | Tinkered component registry |

## Circuit notes

- 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.

## Common mistakes

- **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.
- **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.
- **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.
- **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.
- **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.

## 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.

## Related parts

- [BME680](https://www.tinkered.ai/components/bme680.md): same job: measures air pressure
- [DHT22](https://www.tinkered.ai/components/dht22.md): same job: measures humidity, single-wire
- [DHT11 Temp & Humidity Sensor](https://www.tinkered.ai/components/dht11.md): same job: measures humidity, single-wire
- [BMP280 Pressure Sensor](https://www.tinkered.ai/components/bmp280.md): same job: measures air pressure
- [Waterproof DS18B20](https://www.tinkered.ai/components/ds18b20-waterproof.md): same job: measures temperature, 1-Wire
- [NTC Thermistor (10kΩ)](https://www.tinkered.ai/components/thermistor-ntc-10k.md): same job: measures temperature

## Try it

Tinkered simulates the BME280 in the browser: wire it on a 3D breadboard, run your real code on the board, and measure it. Free to start at https://www.tinkered.ai.
