Skip to content

Commit 9e84353

Browse files
authored
Merge pull request #1187 from dhalbert/board-i2c
Change CircuitPython Essentials examples to use board.I2C()
2 parents 0c7f46b + 1dab6ec commit 9e84353

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

CircuitPython_Essentials/CircuitPython_I2C_Scan.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
import time
44

55
import board
6-
import busio
76

8-
i2c = busio.I2C(board.SCL, board.SDA)
7+
i2c = board.I2C()
98

109
while not i2c.try_lock():
1110
pass

CircuitPython_Essentials/CircuitPython_I2C_TSL2561.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
import adafruit_tsl2561
66
import board
7-
import busio
87

9-
i2c = busio.I2C(board.SCL, board.SDA)
8+
i2c = board.I2C()
109

1110
# Lock the I2C device before we try to scan
1211
while not i2c.try_lock():

0 commit comments

Comments
 (0)