Skip to content

Improving docs and correcting related product description #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 33 additions & 4 deletions adafruit_ms8607.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@

**Hardware:**

* `Adafruit MS8607 Breakout <https:#www.adafruit.com/products/4716>`_
* `Adafruit's MS8607 Pressure Humidity Temperature Breakout
<https://www.adafruit.com/product/4716>`_

**Software and Dependencies:**

* Adafruit CircuitPython firmware for the supported boards:
https:#github.com/adafruit/circuitpython/releases
https://github.com/adafruit/circuitpython/releases

* Adafruit's Bus Device library: https:#github.com/adafruit/Adafruit_CircuitPython_BusDevice
* Adafruit's Register library: https:#github.com/adafruit/Adafruit_CircuitPython_Register
Expand Down Expand Up @@ -116,11 +117,39 @@ class PressureResolution(CV):


class MS8607:
"""Library for the MS8607 Pressure Temperature and Humidity Sensor

"""
Library for the MS8607 Pressure, Temperature and Humidity Sensor

:param ~busio.I2C i2c_bus: The I2C bus the MS8607 is connected to.


**Quickstart: Importing and using the MS8607 temperature sensor**

Here is one way of importing the `MS8607` class so you can use it with the name ``ms``.
First you will need to import the libraries to use the sensor

.. code-block:: python

import busio
import board
import adafruit_ms8607

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

.. code-block:: python

i2c = busio.I2C(board.SCL, board.SDA)
ms = adafruit_ms8607.MS8607(i2c)

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

.. code-block:: python

temperature = ms.temperature
relative_humidity = ms.relative_humidity
pressure = ms.pressure

"""

def __init__(self, i2c_bus):
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Table of Contents
.. toctree::
:caption: Related Products

* `Adafruit MS8607 Breakout <https://www.adafruit.com/products/4716>`_
Adafruit MS8607 Breakout <https://www.adafruit.com/products/4716>

.. toctree::
:caption: Other Links
Expand Down