File tree 4 files changed +6
-9
lines changed
4 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -62,10 +62,9 @@ Usage Example
62
62
63
63
from time import sleep
64
64
import board
65
- import busio
66
65
from adafruit_ms8607 import MS8607
67
66
68
- i2c = busio .I2C(board.SCL, board.SDA )
67
+ i2c = board .I2C()
69
68
sensor = MS8607(i2c)
70
69
71
70
while True:
Original file line number Diff line number Diff line change @@ -122,23 +122,21 @@ class MS8607:
122
122
123
123
:param ~busio.I2C i2c_bus: The I2C bus the MS8607 is connected to.
124
124
125
-
126
125
**Quickstart: Importing and using the MS8607 temperature sensor**
127
126
128
- Here is one way of importing the `MS8607` class so you can use it with the name ``ms`` .
127
+ Here is an example of using the :class: `MS8607` class.
129
128
First you will need to import the libraries to use the sensor
130
129
131
130
.. code-block:: python
132
131
133
- import busio
134
132
import board
135
133
import adafruit_ms8607
136
134
137
- Once this is done you can define your `busio .I2C` object and define your sensor object
135
+ Once this is done you can define your `board .I2C` object and define your sensor object
138
136
139
137
.. code-block:: python
140
138
141
- i2c = busio .I2C(board.SCL, board.SDA)
139
+ i2c = board .I2C() # uses board.SCL and board.SDA
142
140
ms = adafruit_ms8607.MS8607(i2c)
143
141
144
142
Now you have access to the pressure, temperature and humidity using
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ Table of Contents
23
23
.. toctree ::
24
24
:caption: Tutorials
25
25
26
+ Adafruit MS8607 Breakout Learning Guide <https://learn.adafruit.com/adafruit-te-ms8607-pht-sensor >
26
27
27
28
.. toctree ::
28
29
:caption: Related Products
Original file line number Diff line number Diff line change 2
2
# SPDX-License-Identifier: MIT
3
3
from time import sleep
4
4
import board
5
- import busio
6
5
from adafruit_ms8607 import MS8607
7
6
8
- i2c = busio .I2C (board . SCL , board . SDA )
7
+ i2c = board .I2C ()
9
8
sensor = MS8607 (i2c )
10
9
11
10
while True :
You can’t perform that action at this time.
0 commit comments