

The BME BMP280 is a high-precision, low-power barometric pressure and temperature sensor. It is widely used in weather monitoring, altitude measurement, and environmental sensing applications. The sensor is designed for both I2C and SPI communication, making it versatile and easy to integrate into various microcontroller-based projects.
Common applications include:








The BME BMP280 sensor offers the following key technical details:
| Parameter | Value |
|---|---|
| Operating Voltage | 1.71V to 3.6V |
| Typical Operating Current | 2.7 µA (in normal mode) |
| Communication Interface | I2C (up to 3.4 MHz) / SPI (up to 10 MHz) |
| Pressure Measurement Range | 300 hPa to 1100 hPa |
| Temperature Measurement Range | -40°C to +85°C |
| Pressure Resolution | 0.16 Pa |
| Temperature Resolution | 0.01°C |
| Operating Temperature | -40°C to +85°C |
The BME BMP280 sensor typically comes in a breakout board format. Below is the pin configuration:
| Pin Name | Description |
|---|---|
| VCC | Power supply (1.71V to 3.6V) |
| GND | Ground |
| SCL | Serial Clock Line for I2C / SPI Clock |
| SDA | Serial Data Line for I2C / SPI Data |
| CS | Chip Select for SPI (active low) |
| SDO | Serial Data Output for SPI / I2C Address Bit |
The BME BMP280 can be easily connected to an Arduino UNO using the I2C interface. Below is the wiring guide:
| BME BMP280 Pin | Arduino UNO Pin |
|---|---|
| VCC | 3.3V |
| GND | GND |
| SCL | A5 (SCL) |
| SDA | A4 (SDA) |
The following example demonstrates how to read temperature and pressure data from the BME BMP280 using the Adafruit BMP280 library.
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP280.h>
// Create an instance of the BMP280 sensor
Adafruit_BMP280 bmp;
// Define sea level pressure in hPa for altitude calculation
#define SEALEVELPRESSURE_HPA (1013.25)
void setup() {
Serial.begin(9600);
// Initialize the BMP280 sensor
if (!bmp.begin(0x76)) {
// Check if the sensor is connected at I2C address 0x76
Serial.println("Could not find a valid BMP280 sensor, check wiring!");
while (1); // Halt execution if sensor is not found
}
}
void loop() {
// Read and print temperature
Serial.print("Temperature = ");
Serial.print(bmp.readTemperature());
Serial.println(" °C");
// Read and print pressure
Serial.print("Pressure = ");
Serial.print(bmp.readPressure());
Serial.println(" Pa");
// Calculate and print altitude
Serial.print("Approx. Altitude = ");
Serial.print(bmp.readAltitude(SEALEVELPRESSURE_HPA));
Serial.println(" m");
Serial.println();
delay(2000); // Wait 2 seconds before the next reading
}
0x76. If the SDO pin is connected to VCC, the address changes to 0x77.SEALEVELPRESSURE_HPA for your location.Sensor Not Detected:
Incorrect Readings:
Altitude Readings Are Inaccurate:
SEALEVELPRESSURE_HPA value in the code to match your local sea level pressure.Q: Can the BME BMP280 measure humidity?
A: No, the BMP280 measures only temperature and pressure. For humidity measurements, use the BME280 sensor.
Q: Can I use the BMP280 with a 5V microcontroller?
A: Yes, but you must use a logic level shifter for the I2C or SPI lines, as the BMP280 operates at 3.3V logic levels.
Q: How do I switch between I2C and SPI modes?
A: The communication mode is determined by the wiring. For I2C, connect the CS pin to VCC. For SPI, connect the CS pin to the microcontroller's GPIO pin and configure it in your code.
By following this documentation, you can effectively integrate the BME BMP280 sensor into your projects for accurate environmental sensing.