Skip to content

Commit a6100fb

Browse files
authored
Merge pull request #20 from caternuson/iss19
Switch to using I2C singleton
2 parents 617bb07 + 31d1f6d commit a6100fb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

adafruit_crickit.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import sys
4545

4646
import board
47-
import busio
4847

4948
from micropython import const
5049

@@ -378,5 +377,5 @@ def reset(self):
378377
"""A singleton instance to control a single Crickit board, controlled by the default I2C pins."""
379378

380379
# Sphinx's board is missing real pins so skip the constructor in that case.
381-
if "SCL" in dir(board):
382-
crickit = Crickit(Seesaw(busio.I2C(board.SCL, board.SDA))) # pylint: disable=invalid-name
380+
if "I2C" in dir(board):
381+
crickit = Crickit(Seesaw(board.I2C())) # pylint: disable=invalid-name

0 commit comments

Comments
 (0)