bme680
- Environmental Sensor¶
Example:
import bme680, utime
bme680.init()
while True:
temperature, humidity, pressure, resistance = bme680.get_data()
print("Temperature: {:10.2f} °C".format(temperature))
print("Humidity: {:10.2f} % r.h.".format(humidity))
print("Pressure: {:10.2f} hPa".format(pressure))
print("Gas Resistance: {:10.2f} Ω".format(resistance))
utime.sleep(1)
-
bme680.
init
()¶ Initialize the sensor.
Before being able to read data from the sensor, you have to call
bme680.init()
.New in version 1.4.
-
bme680.
get_data
()¶ Perform a single measurement of environmental data.
- Returns
Tuple containing
temperature
(°C),humidity
(% r.h.),pressure
(hPa) andgas resistance
(Ohm).
New in version 1.4.
-
bme680.
deinit
()¶ Deinitialize the sensor.
New in version 1.4.