File tree Expand file tree Collapse file tree 3 files changed +20
-16
lines changed Expand file tree Collapse file tree 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:
5555 Usage Example
5656=============
5757
58- .. code-block :: python
58+ .. code-block :: python3
5959
60- import time
61- import board
62- import adafruit_adt7410
60+ import time
61+ import board
62+ import adafruit_adt7410
6363
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
6767
68- while True :
69- print (adt.temperature)
70- time.sleep(0.5 )
68+ while True:
69+ print(adt.temperature)
70+ time.sleep(0.5)
7171
7272
7373 Contributing
Original file line number Diff line number Diff line change 1616
1717**Hardware:**
1818
19- * `Adafruit's ADT7410 analog temperature Sensor Breakout:
19+ * `Adafruit ADT7410 analog temperature Sensor Breakout
2020 <https://www.adafruit.com/product/4089>`_ (Product ID: 4089)
2121
22+
2223**Software and Dependencies:**
2324
2425* 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
2630
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
2833
29- * Adafruit's Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
3034"""
3135
3236
Original file line number Diff line number Diff line change 55import board
66import adafruit_adt7410
77
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 )
1010adt .high_resolution = True
1111
1212while True :
You can’t perform that action at this time.
0 commit comments