BMPX8X Class
- ID: bmpx8x
- Name: BMP Atmospheric Pressure Sensor
- Other Names: GY65 BMP085 BMP180 BMP183
- Category: pressure
- Manufacturer: bosch seeed adafruit sparkfun
- Connection: i2c
- Link: https://www.sparkfun.com/datasheets/Components/General/BST-BMP085-DS000-05.pdf
- Link: https://www.bosch-sensortec.com/bst/products/all_products/bmp180
- Link: https://cdn-shop.adafruit.com/datasheets/1900_BMP183.pdf
Bosch GY65/BMP085 and BMP180 are high-precision, ultra-low power consumption pressure sensors. They operate in the range of 30,000-110,000 Pa.
This module has been tested on the GY65/BMP085 and BMP180 sensors.
Item Index
Methods
BMPX8X
-
bus
-
addr
Instantiates a BMPX8X object
Parameters:
-
bus
NumberI2C bus to use.
-
addr
NumberThe I2C address of the device.
Returns:
update
()
Query the device and update the internal state. This method must be called before calling getPressure() , getTemperature() , getSealevelPressure() , and getAltitude() to retrieve values.
reset
()
Reset the device to power-on defaults. All calibration data is lost when the device is reset, so you should call init() before attempting to use the device.
init
-
oss
Initialize the device, read calibration data, and start operation. This function is called from the constructor, so it will not typically need to be called by a user unless the device is reset.
Parameters:
-
oss
BMPX8X_OSS_TOne of the BMPX8X_OSS_T values. The default is BMPX8X_OSS_ULTRAHIGHRES.
setOversampling
-
oss
Set the oversampling (precision mode) of the device. Higher precision requires more time to complete. This call takes effect the next time update() is called.
Parameters:
-
oss
BMPX8X_OSS_TOne of the BMPX8X_OSS_T values. The default is BMPX8X_OSS_ULTRAHIGHRES.
getPressure
()
Number
Returns the calculated pressure in Pascals. update() must have been called prior to calling this function.
Returns:
The pressure in Pascals.
getTemperature
()
Number
Returns the calculated temperature in Celsius. update() must have been called prior to calling this function.
Returns:
The temperature in Celsius.
getSealevelPressure
-
meters
Using the supplied altitude in meters, compute the pressure at sea level in Pascals. update() must have been called prior to calling this function.
Parameters:
-
meters
NumberThe altitude in meters.
Returns:
The computed sea level pressure in Pascals.
getSealevelPressure
()
Number
Using the current calculated altitude, compute the pressure at sea level in Pascals. update() must have been called prior to calling this function.
Returns:
The computed sea level pressure in Pascals.
getAltitude
-
sealevelPressure
Calculate the current altitude in meters, given a sea level pressure in Pascals. The default sea level pressure is 101325 Pascals. update() must have been called prior to calling this function.
Parameters:
-
sealevelPressure
NumberThe pressure at sea level in Pascals. The default is 101325 Pascals.
Returns:
the computed altitude in meters.
getTemperatureCelsius
()
Number
Return latest calculated temperature value in Celsius. See ITemperatureSensor .
Returns:
The current temperature in Celsius.
getPressurePa
()
Number
Return latest calculated pressure value in Pascals. See IPressureSensor .
Returns:
The current pressure in Pascals.
getModuleName
()
String
Returns the name of module.
Returns:
The name of the module.