Skip to content

Change i2c bus parameter name to match most other libraries #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions adafruit_bh1750.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class Resolution(CV):
class BH1750: # pylint:disable=too-many-instance-attributes
"""Library for the BH1750 Sensor
:param ~busio.I2C i2c_bus: The I2C bus the BH1750 is connected to.
:param ~busio.I2C i2c: The I2C bus the BH1750 is connected to.
:param int address: The I2C device address. Defaults to :const:`0x23`.Can be
set to :const:`0x5C` by pulling the address pin high.
Expand Down Expand Up @@ -182,9 +182,9 @@ class BH1750: # pylint:disable=too-many-instance-attributes
mode = RWBitfields(2, 4)
resolution = RWBitfields(2, 0)

def __init__(self, i2c_bus, address=_BH1750_DEFAULT_ADDRESS):
def __init__(self, i2c, address=_BH1750_DEFAULT_ADDRESS):

self.i2c_device = i2c_device.I2CDevice(i2c_bus, address)
self.i2c_device = i2c_device.I2CDevice(i2c, address)
self._buffer = bytearray(2)
self._settings_byte = 0

Expand Down