File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ To install in a virtual environment in your current project:
59
59
Usage Example
60
60
=============
61
61
62
- .. code-block :: python
62
+ .. code-block :: python3
63
63
64
64
import time
65
65
import board
Original file line number Diff line number Diff line change 15
15
16
16
**Hardware:**
17
17
18
- * Adafruit's SHT40 Temperature & Humidity Sensor: https://www.adafruit.com/product/4885
18
+ * `Adafruit SHT40 Temperature & Humidity Sensor
19
+ <https://www.adafruit.com/product/4885>`_ (Product ID: 4885)
19
20
20
21
**Software and Dependencies:**
21
22
22
23
* Adafruit CircuitPython firmware for the supported boards:
23
24
https://circuitpython.org/downloads
24
25
25
- * Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
26
+ * Adafruit's Bus Device library:
27
+ https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
26
28
27
29
"""
28
30
@@ -165,7 +167,7 @@ def mode(self):
165
167
166
168
@mode .setter
167
169
def mode (self , new_mode ):
168
- print ( new_mode )
170
+
169
171
if not Mode .is_valid (new_mode ):
170
172
raise AttributeError ("mode must be a Mode" )
171
173
self ._mode = new_mode
Original file line number Diff line number Diff line change 6
6
import board
7
7
import adafruit_sht4x
8
8
9
- i2c = board .I2C ()
9
+ i2c = board .I2C () # uses board.SCL and board.SDA
10
10
sht = adafruit_sht4x .SHT4x (i2c )
11
11
print ("Found SHT4x with serial number" , hex (sht .serial_number ))
12
12
You can’t perform that action at this time.
0 commit comments