A wrapper module for reading values provided by bme680 air quality i2c sensor.


bme680.get_reading(sda_pin, scl_pin, vcc_pin=None)

Returns air quality readings, for given I2C SCL/SDA and VCC pins. If vcc_pin is defined it will first power on sensors and it will power off sensors at the end.

Assumes that the i2c address is: 0x61

from sensors import bme680
(pressure, temperature, humidity, gas) = bme680.get_reading('P9', 'P10', None)
  • params
    • sda_pin: i2c SDA pin.
    • scl_pin: i2c SCL pin.
    • vcc_pin: (optional) the pin that controls the power to the sensors.
  • returns tuple (pressure, temperature, humidity, gas)
    • pressure: the atmospheric pressure in heptopascal (hP)
    • temperature: float number with temperature in Celsius
    • humidity: float number with relative humidity
    • gas: gas resistance in Ohm

Includes implementation by Adafruit

`bme680` - BME680 - Temperature, Humidity, Pressure & Gas Sensor

MicroPython driver from BME680 air quality sensor, based on Adafruit_bme680

- Author(s): Limor 'Ladyada' Fried of Adafruit
Jeff Raber (SPI support)
and many more contributors