You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Base BMP280 object. Use `Adafruit_BMP280_I2C` or `Adafruit_BMP280_SPI` instead of this. This checks the BMP280 was found, reads the coefficients and enables the sensor for continuous reads"""
65
65
def__init__(self):
66
-
"""Check the BMP280 was found, read the coefficients and enable the sensor for continuous reads"""
67
66
# Check device ID.
68
67
id=self._read_byte(_BMP280_REGISTER_CHIPID)
69
68
if_BMP280_CHIPID!=id:
70
69
raiseRuntimeError('Failed to find BMP280! Chip ID 0x%x'%id)
71
70
self._read_coefficients()
72
71
self.seaLevelhPa=1013.25
72
+
"""Pressure in hectoPascals at sea level. Used to calibrate `altitude`."""
73
73
74
74
@property
75
75
deftemperature(self):
76
76
"""The compensated temperature in degrees celsius."""
77
77
# perform one measurement in high res, forced mode
"""Check the BMP280 was found, read the coefficients and enable the sensor for continuous reads. Default address is 0x77 but another address can be passed in as an argument"""
150
+
"""Driver for I2C connected BMP280. Default address is 0x77 but another address can be passed in as an argument"""
"""Driver for SPI connected BMP280. Default clock rate is 100000 but can be changed with 'baudrate'"""
171
173
def__init__(self, spi, cs, baudrate=100000):
172
-
"""Check the BMP280 was found, read the coefficients and enable the sensor for continuous reads. Default clock rate is 100000 but can be changed with 'baudrate'"""
0 commit comments