CircuitPython driver for the MS8607 PTH sensor

  • Author(s): Bryan Siepert

Implementation Notes


Software and Dependencies:

  • Adafruit’s Bus Device library:
  • Adafruit’s Register library:
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

The humidity sensor’s measurement resolution


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


The current barometric pressure in hPa


Pressure and Temperature, measured at the same time


The measurement resolution used for the pressure and temperature sensor


The current relative humidity in % rH


Reset the sensor to an initial unconfigured state


The current temperature in degrees Celcius

class adafruit_ms8607.PressureResolution

Options for pressure_resolution