File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -104,18 +104,6 @@ def _read_temperature(self):
104104 self ._t_fine = int (var1 + var2 )
105105 #print("t_fine: ", self.t_fine)
106106
107- @property
108- def dew_point (self ):
109- # pylint: disable=invalid-name
110- # Disable: c is a constant used in the Magnus formula
111- """The dew point in Celsius using the Magnus formula. Constants from Sontag, 1990."""
112- b = 17.62
113- c = 243.12
114- gamma = (b * self .temperature / (c + self .temperature )) + math .log (self .humidity / 100.0 )
115- dewpoint = (c * gamma ) / (b - gamma )
116- return dewpoint
117- # pylint: enable=invalid-name
118-
119107 @property
120108 def temperature (self ):
121109 """The compensated temperature in degrees celsius."""
Original file line number Diff line number Diff line change 99bme280 = adafruit_bme280 .Adafruit_BME280_I2C (i2c )
1010
1111# OR create library object using our Bus SPI port
12- # spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
13- # bme_cs = digitalio.DigitalInOut(board.D5 )
14- # bme280 = adafruit_bme280.Adafruit_BME280_SPI(spi, bme_cs)
12+ #spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
13+ #bme_cs = digitalio.DigitalInOut(board.D10 )
14+ #bme280 = adafruit_bme280.Adafruit_BME280_SPI(spi, bme_cs)
1515
1616# change this to match the location's pressure (hPa) at sea level
1717bme280 .sea_level_pressure = 1013.25
2121 print ("Humidity: %0.1f %%" % bme280 .humidity )
2222 print ("Pressure: %0.1f hPa" % bme280 .pressure )
2323 print ("Altitude = %0.2f meters" % bme280 .altitude )
24- print ("Dew point = %0.1f C" % bme280 .dew_point )
2524 time .sleep (2 )
You can’t perform that action at this time.
0 commit comments