diff --git a/README.rst b/README.rst index ee4e2a2..435f81c 100644 --- a/README.rst +++ b/README.rst @@ -62,10 +62,9 @@ Usage Example from time import sleep import board - import busio from adafruit_ms8607 import MS8607 - i2c = busio.I2C(board.SCL, board.SDA) + i2c = board.I2C() sensor = MS8607(i2c) while True: diff --git a/adafruit_ms8607.py b/adafruit_ms8607.py index 2609699..bd5acb4 100644 --- a/adafruit_ms8607.py +++ b/adafruit_ms8607.py @@ -122,23 +122,21 @@ class MS8607: :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``. + Here is an example of using the :class:`MS8607` class. 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 + Once this is done you can define your `board.I2C` object and define your sensor object .. code-block:: python - i2c = busio.I2C(board.SCL, board.SDA) + 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 diff --git a/docs/index.rst b/docs/index.rst index b7c464a..a61b99f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -23,6 +23,7 @@ Table of Contents .. toctree:: :caption: Tutorials + Adafruit MS8607 Breakout Learning Guide .. toctree:: :caption: Related Products diff --git a/examples/ms8607_simpletest.py b/examples/ms8607_simpletest.py index c84f91d..c8b0d9e 100644 --- a/examples/ms8607_simpletest.py +++ b/examples/ms8607_simpletest.py @@ -2,10 +2,9 @@ # SPDX-License-Identifier: MIT from time import sleep import board -import busio from adafruit_ms8607 import MS8607 -i2c = busio.I2C(board.SCL, board.SDA) +i2c = board.I2C() sensor = MS8607(i2c) while True: