BMP280 Temperature, Pressure Sensor
Overview
High precision temperature and atmospheric pressure measurement sensor using BOSCH’s BMP280 chip. Uses I2C or SPI interface.

Specifications
- Operating Voltage: 3.3V-5.5V
- Communication Interface: I2C(5V compatible)
- Default I2C Address: 0x76
- Pressure Measuring Range: 300~1100hPa
- Relative Accuracy: ±0.12hPa(±1m)
- Absolute Accuracy: ±1hPa(±8.33m)
- Temperature Measuring Range: 0℃~65℃
- Temperature Measuring Accuracy: 0.01℃
Supported GPIO
- Raspberry Pi 0~4
- Raspberry Pi 5
- BeagleBone Black/Green
- Jetson Nano
- FT232H, FT2232H, FT4232H
- MCP2221
Commands
[SET_SAMPLING]
Configures sensor settings such as Mode, Sampling Rate, Filter, etc.
Item | Type | Description |
---|---|---|
Mode | WRITE | Select the mode. (Sleep: standby mode, Forced: single measurement mode, Normal: continuous measurement mode, Soft Reset: module reset) |
Temperature Sampling rate | WRITE | Select temperature measurement cycle (Sampling rate). (off, x1, x2, x4, x8, x16) |
Pressure Sampling rate | WRITE | Select pressure measurement cycle (Sampling rate). (off, x1, x2, x4, x8, x16) |
Filter | WRITE | Select the mode of the IIR filter inside the chip. This filter is for removing short-term fluctuations in atmospheric pressure. (off,x2,x4,x8,x16) |
Standby Time | WRITE | Select the waiting time between measurements in continuous measurement mode. (1ms,63ms,125ms,250ms,500ms,1000ms,2000ms,4000ms) |
[READ_DATA]
Reads temperature and atmospheric pressure.
Item | Type | Description |
---|---|---|
Temperature(℃) | READ | Measured temperature. |
Pressure(Pa) | READ | Measured atmospheric pressure. |
[READ_ALTITUDE]
Calculates the altitude of the current location using sea level pressure.
Item | Type | Description |
---|---|---|
Sea Level Pressure(hPa) | WRITE | Enter the sea level pressure of the current location. |
Altitude(m) | READ | Calculated altitude. |
[SEA_LEVEL_FOR_ALTITUDE]
Calculates the sea level pressure of the current location using altitude.
Item | Type | Description |
---|---|---|
Altitude(m) | WRITE | Enter the altitude of the current location. |
Sea Level Pressure(hPa) | READ | Calculated sea level pressure. |
[TAKE_FORCED_MEAS]
Manually performs a single measurement. (Only available in Forced mode)
Item | Type | Description |
---|---|---|
Temperature(℃) | READ | Measured temperature. |
Pressure(Pa) | READ | Measured atmospheric pressure. |
Example
Objective
Display temperature and atmospheric pressure readings from BMP280 on dashboard gauge widgets.
Parts
Part | Quantity |
---|---|
Raspberry Pi 4 * | 1 |
BMP280 | 1 |
* Other hardware can also be used. Refer to Supported GPIO.
Wiring (I2C)
Connect each component to the corresponding connection as listed in each row below.
BMP280 | GPIO |
---|---|
VIN | 3.3V |
GND | GND |
SDI | 2 (I2C1 SDA) |
SCK | 3 (I2C1 SCL) |
SDO * | GND |
* If SDO pin is connected to GND, I2C address is 0x76, if connected to 3.3V it is 0x77. (May vary depending on module manufacturer.)

Wiring (SPI)
Connect each component to the corresponding connection as listed in each row below.
BMP280 | GPIO |
---|---|
VIN | 3.3V |
GND | GND |
CS | 8 (SPI0 CE0) |
SDO | 9 (SPI0 MISO) |
SDI | 10 (SPI0 MOSI) |
SCK | 11 (SPI0 SCLK) |

Project Link
BMP280 SPI