BMP280 Breakout Digital pressure sensor module(V1.0) Wiki - DFRobot


This is a breakout version of BMP280 Barometric Pressure Sensor from DFRobot with temperature and pressure measurement functions, supporting Arduino code control.
Housed in a extremely compact package, the BMP280 is based on Bosch’s proven Piezo-resistive pressure sensor technology featuring high EMO robustness, high accuracy and linearity and long term stability. Numerous device operation options offer highest flexibility to optimize the device regarding power consumption, resolution and filter performance.
Barometric sensors are usually used to measure barometric pressure and temperature. But besides that, they can also measure altitude and relative floor height due to the fact that there is a certain relationship between altitude and barometric pressure. As for navigation, the barometric pressure sensor can be used to enhance GPS positioning or realize 3D indoor navigation with IMU sensor.




More information, please refer to BMP280 Datasheet in More Documents.

Board Overview

Top View

Bottom View

Silkscreen Function Description
SCL I2C Clock
SDA I2C Data
ADDR I2C Address Select


Detect the barometric pressure and temperature of the current environment and calculate the altitude of the environment in which the module is located.


Connection Diagram

Connect this module with UNO board via I2C port.


Sample Code

Download BMP280 Library. About how to install a library?

 * read_data.ino
 * Download this demo to test simple read from bmp280, connect sensor through IIC interface
 * Data will print on your serial monitor
 * Copyright   [DFRobot](, 2016
 * Copyright   GNU Lesser General Public License
 * version  V1.0
 * date  12/03/2019

#include "DFRobot_BMP280.h"
#include "Wire.h"

typedef DFRobot_BMP280_IIC    BMP;    // ******** use abbreviations instead of full names ********

BMP   bmp(&Wire, BMP::eSdo_low);

#define SEA_LEVEL_PRESSURE    1015.0f   // sea level pressure

// show last sensor operate status
void printLastOperateStatus(BMP::eStatus_t eStatus)
  switch(eStatus) {
  case BMP::eStatusOK:    Serial.println("everything ok"); break;
  case BMP::eStatusErr:   Serial.println("unknow error"); break;
  case BMP::eStatusErrDeviceNotDetected:    Serial.println("device not detected"); break;
  case BMP::eStatusErrParameter:    Serial.println("parameter error"); break;
  default: Serial.println("unknow status"); break;

void setup()
  Serial.println("bmp read data test");
  while(bmp.begin() != BMP::eStatusOK) {
    Serial.println("bmp begin faild");
  Serial.println("bmp begin success");

void loop()
  float   temp = bmp.getTemperature();
  uint32_t    press = bmp.getPressure();
  float   alti = bmp.calAltitude(SEA_LEVEL_PRESSURE, press);

  Serial.println("======== start print ========");
  Serial.print("temperature (unit Celsius): "); Serial.println(temp);
  Serial.print("pressure (unit pa):         "); Serial.println(press);
  Serial.print("altitude (unit meter):      "); Serial.println(alti);
  Serial.println("========  end print  ========");


Expected Results


For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents

DFshopping_car1.png Get BMP280 Digital Pressure Sensor Module from DFRobot Store or DFRobot Distributor.

Turn to the Top