17aba2041ac13d819ff23f3f431cf6b8f395702f
4 from bme280
import BME280
7 from smbus2
import SMBus
9 from smbus
import SMBus
11 print("""weather.py - Print readings from the BME280 weather sensor.
18 bme280
= BME280(i2c_dev
=bus
)
21 temperature
= bme280
.get_temperature()
22 pressure
= bme280
.get_pressure()
23 humidity
= bme280
.get_humidity()
24 print("""Temperature: {:05.2f} *C
25 Pressure: {:05.2f} hPa
26 Relative humidity: {:05.2f} %
27 """.format(temperature
, pressure
, humidity
))