Skip to content

Commit 1fdbecf

Browse files
author
caternuson
committed
changed __init__ to be like others
1 parent 5d92f8f commit 1fdbecf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

adafruit_tsl2561.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,8 @@
4949
class TSL2561():
5050
"""Class which provides interface to TSL2561 light sensor."""
5151

52-
def __init__(self, i2c=None, address=TSL2561_DEFAULT_ADDRESS, **kwargs):
52+
def __init__(self, i2c, address=TSL2561_DEFAULT_ADDRESS, **kwargs):
5353
self.buf = bytearray(3)
54-
if i2c is None:
55-
import board
56-
import busio
57-
i2c = busio.I2C(board.SCL, board.SDA)
5854
self.i2c_device = I2CDevice(i2c, address)
5955
self.enabled = True
6056

0 commit comments

Comments
 (0)