TM STM32F4xx Libraries  v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle
TM_BMP180_Functions

Library Functions. More...

Functions

TM_BMP180_Result_t TM_BMP180_Init (TM_BMP180_t *BMP180_Data)
 Initializes BMP180 pressure sensor. More...
 
TM_BMP180_Result_t TM_BMP180_StartTemperature (TM_BMP180_t *BMP180_Data)
 Starts temperature sensor on BMP180. More...
 
TM_BMP180_Result_t TM_BMP180_ReadTemperature (TM_BMP180_t *BMP180_Data)
 Reads temperature from BMP180 sensor. More...
 
TM_BMP180_Result_t TM_BMP180_StartPressure (TM_BMP180_t *BMP180_Data, TM_BMP180_Oversampling_t Oversampling)
 Starts pressure measurement on BMP180 sensor. More...
 
TM_BMP180_Result_t TM_BMP180_ReadPressure (TM_BMP180_t *BMP180_Data)
 Reads pressure from BMP180 sensor and calculate it. More...
 
uint32_t TM_BMP180_GetPressureAtSeaLevel (uint32_t pressure, float altitude)
 Calculates pressure above sea level in pascals. More...
 

Detailed Description

Library Functions.

Function Documentation

uint32_t TM_BMP180_GetPressureAtSeaLevel ( uint32_t  pressure,
float  altitude 
)

Calculates pressure above sea level in pascals.

This is good, if you read pressure from sensor at known altitude, not altitude provided from sensor. Altitude from sensor is calculated in fact, that pressure above the sea is 101325 Pascals. So, if you know your pressure, and you use calculated altitude, you will not get real pressure above the sea.

Warning
You need calculated pressure from sensor, and known altitude (from other sensor or GPS data, or whatever) and then you are able to calculate pressure above the sea level.
Parameters
pressurePressure at known altitude in units of pascals
altitudeKnown altitude in units of meters
Return values
Pressureabove the sea in units of pascals
TM_BMP180_Result_t TM_BMP180_Init ( TM_BMP180_t BMP180_Data)

Initializes BMP180 pressure sensor.

Parameters
*BMP180_DataPointer to TM_BMP180_t structure
Return values
Memberof TM_BMP180_Result_t
TM_BMP180_Result_t TM_BMP180_ReadPressure ( TM_BMP180_t BMP180_Data)

Reads pressure from BMP180 sensor and calculate it.

Parameters
*BMP180_DataPointer to TM_BMP180_t structure
Return values
Memberof TM_BMP180_Result_t
TM_BMP180_Result_t TM_BMP180_ReadTemperature ( TM_BMP180_t BMP180_Data)

Reads temperature from BMP180 sensor.

Note
Temperature has 0.1 degrees Celcius resolution
Parameters
*BMP180_DataPointer to TM_BMP180_t structure
Return values
Memberof TM_BMP180_Result_t
TM_BMP180_Result_t TM_BMP180_StartPressure ( TM_BMP180_t BMP180_Data,
TM_BMP180_Oversampling_t  Oversampling 
)

Starts pressure measurement on BMP180 sensor.

Parameters
*BMP180_DataPointer to TM_BMP180_t structure
OversamplingOversampling option for pressure calculation. This parameter can be a value of TM_BMP180_Oversampling_t enumeration
Note
Calculation time depends on selected oversampling
Return values
Memberof TM_BMP180_Result_t
TM_BMP180_Result_t TM_BMP180_StartTemperature ( TM_BMP180_t BMP180_Data)

Starts temperature sensor on BMP180.

Parameters
*BMP180_DataPointer to TM_BMP180_t structure
Return values
Memberof TM_BMP180_Result_t