File tree 3 files changed +20
-16
lines changed 3 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -55,19 +55,19 @@ To install in a virtual environment in your current project:
55
55
Usage Example
56
56
=============
57
57
58
- .. code-block :: python
58
+ .. code-block :: python3
59
59
60
- import time
61
- import board
62
- import adafruit_adt7410
60
+ import time
61
+ import board
62
+ import adafruit_adt7410
63
63
64
- i2c_bus = board.I2C()
65
- adt = adafruit_adt7410.ADT7410(i2c_bus, address = 0x 48 )
66
- adt.high_resolution = True
64
+ i2c = board.I2C() # uses board.SCL and board.SDA
65
+ adt = adafruit_adt7410.ADT7410(i2c_bus, address=0x48)
66
+ adt.high_resolution = True
67
67
68
- while True :
69
- print (adt.temperature)
70
- time.sleep(0.5 )
68
+ while True:
69
+ print(adt.temperature)
70
+ time.sleep(0.5)
71
71
72
72
73
73
Contributing
Original file line number Diff line number Diff line change 16
16
17
17
**Hardware:**
18
18
19
- * `Adafruit's ADT7410 analog temperature Sensor Breakout:
19
+ * `Adafruit ADT7410 analog temperature Sensor Breakout
20
20
<https://www.adafruit.com/product/4089>`_ (Product ID: 4089)
21
21
22
+
22
23
**Software and Dependencies:**
23
24
24
25
* Adafruit CircuitPython firmware for the supported boards:
25
- https://github.com/adafruit/circuitpython/releases
26
+ https://circuitpython.org/downloads
27
+
28
+ * Adafruit's Bus Device library:
29
+ https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
26
30
27
- * Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
31
+ * Adafruit's Register library:
32
+ https://github.com/adafruit/Adafruit_CircuitPython_Register
28
33
29
- * Adafruit's Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
30
34
"""
31
35
32
36
Original file line number Diff line number Diff line change 5
5
import board
6
6
import adafruit_adt7410
7
7
8
- i2c_bus = board .I2C ()
9
- adt = adafruit_adt7410 .ADT7410 (i2c_bus , address = 0x48 )
8
+ i2c = board .I2C () # uses board.SCL and board.SDA
9
+ adt = adafruit_adt7410 .ADT7410 (i2c , address = 0x48 )
10
10
adt .high_resolution = True
11
11
12
12
while True :
You can’t perform that action at this time.
0 commit comments