We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddfa77e commit 9b1b886Copy full SHA for 9b1b886
LiveObjects/hal.py
@@ -246,6 +246,8 @@ def get_i2c():
246
i2c = machine.SoftI2C(scl=machine.Pin(scl), sda=machine.Pin(sda), freq=100000)
247
if i2c.scan() and len(i2c.scan()) < MAX_DEV_NB:
248
return i2c
249
+ except ValueError: # next sda, scl
250
+ pass
251
except AttributeError: # Pycom MicroPython 1.20.2.r6 [v1.11-c5a0a97] on 2021-10-28
252
i2c = machine.I2C(0)
253
0 commit comments