Skip to content

Commit b79e60f

Browse files
authored
Merge pull request #19 from FoamyGuy/remove_busio
use board.I2C() instead of busio in the example script
2 parents d75654b + c83f6f2 commit b79e60f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/si7021_simpletest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
"""
2+
Initializes the sensor, gets and prints readings every two seconds.
3+
"""
14
import time
25
import board
3-
import busio
46
import adafruit_si7021
57

68
# Create library object using our Bus I2C port
7-
i2c = busio.I2C(board.SCL, board.SDA)
8-
sensor = adafruit_si7021.SI7021(i2c)
9-
9+
sensor = adafruit_si7021.SI7021(board.I2C())
1010

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

0 commit comments

Comments
 (0)