Skip to content

Commit d5e1844

Browse files
authored
Merge pull request #1 from kattni/example-i2c-update
Update to use board.I2C()
2 parents 77f5b7c + 5d8905e commit d5e1844

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/ahtx0_simpletest.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import time
22
import board
3-
import busio
43
import adafruit_ahtx0
54

6-
# Create library object using our Bus I2C port
7-
i2c = busio.I2C(board.SCL, board.SDA)
8-
sensor = adafruit_ahtx0.AHTx0(i2c)
5+
# Create the sensor object using I2C
6+
sensor = adafruit_ahtx0.AHTx0(board.I2C())
97

108
while True:
119
print("\nTemperature: %0.1f C" % sensor.temperature)

0 commit comments

Comments
 (0)