Skip to content

Commit 7f2e03f

Browse files
authored
Merge pull request #6 from DeadSix27/main
Change i2c bus parameter name to match most other libraries
2 parents 2c688e7 + 68efc7b commit 7f2e03f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_bh1750.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class Resolution(CV):
149149
class BH1750: # pylint:disable=too-many-instance-attributes
150150
"""Library for the BH1750 Sensor
151151
152-
:param ~busio.I2C i2c_bus: The I2C bus the BH1750 is connected to.
152+
:param ~busio.I2C i2c: The I2C bus the BH1750 is connected to.
153153
:param int address: The I2C device address. Defaults to :const:`0x23`.Can be
154154
set to :const:`0x5C` by pulling the address pin high.
155155
@@ -182,9 +182,9 @@ class BH1750: # pylint:disable=too-many-instance-attributes
182182
mode = RWBitfields(2, 4)
183183
resolution = RWBitfields(2, 0)
184184

185-
def __init__(self, i2c_bus, address=_BH1750_DEFAULT_ADDRESS):
185+
def __init__(self, i2c, address=_BH1750_DEFAULT_ADDRESS):
186186

187-
self.i2c_device = i2c_device.I2CDevice(i2c_bus, address)
187+
self.i2c_device = i2c_device.I2CDevice(i2c, address)
188188
self._buffer = bytearray(2)
189189
self._settings_byte = 0
190190

0 commit comments

Comments
 (0)