adafruit_ms8607

CircuitPython driver for the MS8607 PTH sensor

  • Author(s): Bryan Siepert

Implementation Notes

Hardware:

Software and Dependencies:

  • Adafruit’s Bus Device library: https:#github.com/adafruit/Adafruit_CircuitPython_BusDevice

  • Adafruit’s Register library: https:#github.com/adafruit/Adafruit_CircuitPython_Register

class adafruit_ms8607.CV

struct helper

classmethod add_values(value_tuples: Tuple[Any]) None

Add CV values to the class

classmethod is_valid(value: Any) bool

Validate that a given value is a member

class adafruit_ms8607.HumidityResolution

Options for pressure_resolution

class adafruit_ms8607.MS8607(i2c_bus: I2C)

Library for the MS8607 Pressure, Temperature and Humidity Sensor

Parameters:

i2c_bus (I2C) – The I2C bus the MS8607 is connected to.

Quickstart: Importing and using the MS8607 temperature sensor

Here is an example of using the MS8607 class. First you will need to import the libraries to use the sensor

import board
import adafruit_ms8607

Once this is done you can define your board.I2C object and define your sensor object

i2c = board.I2C()  # uses board.SCL and board.SDA
ms = adafruit_ms8607.MS8607(i2c)

Now you have access to the pressure, temperature and humidity using the pressure, temperature and relative_humidity attributes

temperature = ms.temperature
relative_humidity = ms.relative_humidity
pressure = ms.pressure
property humidity_resolution: HumidityResolution

The humidity sensor’s measurement resolution

initialize() None

Configure the sensors with the default settings and state. For use after calling reset()

property pressure: float

The current barometric pressure in hPa

property pressure_and_temperature: None

Pressure and Temperature, measured at the same time

property pressure_resolution: PressureResolution

The measurement resolution used for the pressure and temperature sensor

property relative_humidity: float

The current relative humidity in % rH

reset() None

Reset the sensor to an initial unconfigured state

property temperature: float

The current temperature in degrees Celcius

class adafruit_ms8607.PressureResolution

Options for pressure_resolution