The following message pops up in the shell:
Warning: I2C(-1, ...) is deprecated, use SoftI2C(...) instead
I'm using an ESP32.
If you were previously usingJDRBoston wrote: ↑Thu Sep 08, 2022 3:35 pmThank you for this update about how i2c can be instantiated in the newer MicroPython versions. Is there a way to turn off the "Warning: I2C(-1,...)..." message that is sent to shell? I am using the hardware I2C pins of my device and the machine.I2C() instantiation accordingly. I don't want the user to see the "Warning" when it does not apply and worry. Alternatively, is there a down side to using machine.SoftI2C() with the hardware I2C pins declared. I'm likely wrong, but would this then cause bit banging the port and cause some speed and other software overhead when it isn't needed. Or, does SoftI2C() default to using the hardware I2C resources when the hardware I2C pins are defined. Thank you, J
Code: Select all
machine.I2C(-1, sda=..., scl=...)