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)

Add CV values to the class

classmethod is_valid(value)

Validate that a given value is a member

class adafruit_ms8607.HumidityResolution

Options for pressure_resolution

class adafruit_ms8607.MS8607(i2c_bus)

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
humidity_resolution

The humidity sensor’s measurement resolution

initialize()

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

pressure

The current barometric pressure in hPa

pressure_and_temperature

Pressure and Temperature, measured at the same time

pressure_resolution

The measurement resolution used for the pressure and temperature sensor

relative_humidity

The current relative humidity in % rH

reset()

Reset the sensor to an initial unconfigured state

temperature

The current temperature in degrees Celcius

class adafruit_ms8607.PressureResolution

Options for pressure_resolution