BMP280 Pressure driver

Introduction

The BMP280 driver for pressure sensing is used in conjunction with the BMP280 sensor to measure the pressure of the sensor’s surroundings. The BMP280 can also measure temperature with the same sensor.


Driver Parameters

The BMP280 driver for pressure sensing has two parameters that need to be configured:

I2C Address

This is the address the device is being referenced by on the I2C bus. The BMP280 can have an address of 0x76 or 0x77 with a default address of 0x76. The address can be changed to 0x77 by connecting GND to the SDO/ADR pin of the sensor.

Resolution(ihg)/(pa)

The resolution depends on the measurement system of the central core. If set to imperial, the resolution is in ihg (inches of mercury) and in metric it is in pa (pascal).

The resolution in metric is ranging from 1 to 100 pascal with a default value of 5.

The resolution in imperial is ranging from 0.0003 to 0.3 pascal with a default value of 0.0015.

For example in the metric system, if our latest reading was 8pa and the resolution is set to 3, the builder base is not going to notify the central core unless the value is <5 or >11.

 


Wiring

Example

The SDA and SCL, and GND pins are connected between the Builder Base and the BMP280, as well as the VIN and 5V pins.

 Breadboard 

Schematic 

Used Pins

Used Pins

Description

Used Pins

Description

SDA

Serial Data Line

SCL

Serial Clock Line

5V 

This pin provides the power

GND

This pin provides the GND


How to write an App

Navigate to the App Builder and create a new application. You can find the “Pressure” code object under the “Hardware” Tab in the object drop down menu on the left, or you can also use the search bar.

 

 

 

Drag the “Pressure” Object onto the canvas.

Next, locate the “Text” Object under the Interface tab and drag it onto the canvas.

 

 

 

Finally, connect the “Pressure” port from the Pressure Object grid to the “In” port on the Text grid and save your application.

 


How to create a firmware

Navigate to the Firmware Builder and create a new firmware file.

Click the “+ Add Hardware” button which will open a modal window. Scroll down in the list to find the “sensor” section and select the “pressure” hardware option.

Give your device a name, and click “Add Device”

 

 

Next, select the “BMP280” driver under the driver dropdown menu.

 

 

 

 

For this example we select:

  • I2C Address: 0x76

  • Resolution: .05

 

You may now save your firmware file and upload it to one of your clients.

 

 

 

 


Supported Hardware

  • BMP280


Downloads

Apps

Firmware

Assets