BMP-180

class electronics.devices.bmp180.BMP180(bus, address=119)

Interface for the Bosch BMP180 Digital pressure sensor

Usage:
  • Use load_calibration() to fetch the calibration data from the sensor
  • Use temperature() and pressure() to get the current pressure
Example:
>>> sensor = BMP180(gw)
>>> sensor.load_calibration()
>>> sensor.temperature()
12.5
>>> sensor.pressure()
360808
load_calibration()

Load factory calibration data from device.

pressure()

Get barometric pressure in milibar

Returns:The pressure in milibar as a int
Example:
>>> sensor = BMP180(gw)
>>> sensor.load_calibration()
>>> sensor.pressure()
75216
temperature()

Get the temperature from the sensor.

Returns:The temperature in degree celcius as a float
Example:
>>> sensor = BMP180(gw)
>>> sensor.load_calibration()
>>> sensor.temperature()
21.4