Skip to content

Commit 7997fb7

Browse files
authored
Merge pull request #6 from FoamyGuy/chip_id_0x00
check for 0x00 ID
2 parents 78a1cd2 + a271058 commit 7997fb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_mmc56x3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class MMC5603:
100100
def __init__(self, i2c_bus: I2C, address: int = _MMC5603_I2CADDR_DEFAULT) -> None:
101101
# pylint: disable=no-member
102102
self.i2c_device = i2c_device.I2CDevice(i2c_bus, address)
103-
if self._chip_id != _MMC5603_CHIP_ID:
103+
if self._chip_id not in (_MMC5603_CHIP_ID, 0x00):
104104
raise RuntimeError("Failed to find MMC5603 - check your wiring!")
105105

106106
self.reset()

0 commit comments

Comments
 (0)