Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

boschsensortec/BMP3_SensorAPI

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BMP3 sensor API

Introduction

This package contains the Bosch Sensortec's BMP3 pressure sensor driver (sensor API)

The sensor driver package includes bmp3.h, bmp3.c and bmp3_defs.h files

Integration details

  • Integrate bmp3.h, bmp3_defs.h and bmp3.c file in to your project.
  • Include the bmp3.h file in your code like below.
#include "bmp3.h"

File information

  • bmp3_defs.h : This header file has the constants, macros and datatype declarations.
  • bmp3.h : This header file contains the declarations of the sensor driver APIs.
  • bmp3.c : This source file contains the definitions of the sensor driver APIs.

Supported sensor interfaces

  • SPI 4-wire
  • I2C

Usage guide

Initializing the sensor

To initialize the sensor, you will first need to create a device structure. You can do this by creating an instance of the structure bmp3_dev. Then go on to fill in the various parameters as shown below.

Regarding Compensation functions for temperature and pressure, we have two implementations.

  1. Double precision floating point version
  2. Integer version

If you want to use the floating point version, define the BMP3_FLOAT_COMPENSATION macro in your makefile or uncomment the relevant line in the bmp3_defs.h file. By default, the integer version will be used. Below example code uses floating point representation.

Important links

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.