C Sensor API for the BMP3xy series of Barometers from Bosch Sensortec. To report issues, go to https://community.bosch-sensortec.com/t5/Bosch-Sensortec-Community/ct-p/bst_community
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
#include "bmp3.h"
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.
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.