Use Wire.setPins(<sda>, <scl>)
before calling .begin()
.
https://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/api/i2c.html#setpins
Another way is also to call Wire.begin()
with sda and scl as the first arguments
Use Wire.setPins(<sda>, <scl>)
before calling .begin()
.
https://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/api/i2c.html#setpins
Another way is also to call Wire.begin()
with sda and scl as the first arguments