File tree Expand file tree Collapse file tree 4 files changed +10
-12
lines changed Expand file tree Collapse file tree 4 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,10 @@ Usage Example
6363.. code-block :: python3
6464
6565 import time
66- import busio
6766 import board
6867 import adafruit_shtc3
6968
70- i2c = busio .I2C(board.SCL, board.SDA)
69+ i2c = board .I2C() # uses board.SCL and board.SDA
7170 sht = adafruit_shtc3.SHTC3(i2c)
7271
7372 while True:
Original file line number Diff line number Diff line change @@ -81,24 +81,23 @@ class SHTC3:
8181 """
8282 A driver for the SHTC3 temperature and humidity sensor.
8383
84- :param ~busio.I2C i2c_bus: The `busio. I2C` object to use. This is the only required parameter .
84+ :param ~busio.I2C i2c_bus: The I2C bus the SHTC3 is connected to .
8585
8686 **Quickstart: Importing and using the SHTC3 temperature and humidity sensor**
8787
88- Here is one way of importing the `SHTC3` class so you can use it with the name ``sht` `.
89- First you will need to import the helper libraries to use the sensor
88+ Here is an example of using the : class:`SHTC3 `.
89+ First you will need to import the libraries to use the sensor
9090
9191 .. code-block:: python
9292
93- import busio
9493 import board
9594 import adafruit_shtc3
9695
97- Once this is done, you can define your `busio .I2C` object and define your sensor
96+ Once this is done, you can define your `board .I2C` object and define your sensor
9897
9998 .. code-block:: python
10099
101- i2c = busio .I2C(board.SCL, board.SDA)
100+ i2c = board .I2C() # uses board.SCL and board.SDA
102101 sht = adafruit_shtc3.SHTC3(i2c)
103102
104103 Now you have access to the temperature and humidity using the :attr:`measurements`.
@@ -146,7 +145,7 @@ def reset(self):
146145 self ._write_command (_SHTC3_SOFTRESET )
147146
148147 except RuntimeError as run_err :
149- if run_err .args and run_err .args [0 ] != "I2C slave address was NACK'd" :
148+ if run_err .args and run_err .args [0 ] != "I2C device address was NACK'd" :
150149 raise run_err
151150 time .sleep (0.001 )
152151
Original file line number Diff line number Diff line change @@ -23,11 +23,12 @@ Table of Contents
2323.. toctree ::
2424 :caption: Tutorials
2525
26-
26+ Adafruit Sensirion SHTC3 Temperature & Humidity Sensor Learning Guide < https://learn.adafruit.com/adafruit-sensirion-shtc3-temperature-humidity-sensor >
2727
2828.. toctree ::
2929 :caption: Related Products
3030
31+ Adafruit Sensirion SHTC3 Temperature & Humidity Sensor <https://www.adafruit.com/product/4636 >
3132
3233.. toctree ::
3334 :caption: Other Links
Original file line number Diff line number Diff line change 22#
33# SPDX-License-Identifier: MIT
44import time
5- import busio
65import board
76import adafruit_shtc3
87
9- i2c = busio .I2C (board . SCL , board . SDA )
8+ i2c = board .I2C ()
109sht = adafruit_shtc3 .SHTC3 (i2c )
1110
1211while True :
You can’t perform that action at this time.
0 commit comments