Changing SDL and SCA pins on custom ESP32 board

Hi All, I have a custom board that uses the ESP321-WROOM-32U module and the SCL and SDA pins are not standard. I Googled about how to modify a variant. I made a new entry inboards.txt and also modified pins_arduino.h on my Mac in:

~/Library/Arduino/Packages/esp32/hardware/esp32/1.0.1/variants/esp32/pins_arduino.h

But no joy. What am i missing?

Thank you...

What do you mean, “not standard”? The processor itself has internal hardware for I2C that is hard wired to certain pins. Sometimes there are one or two sets of alternates, but they are fixed. You can’t just assign any GPIO.

What about simply changing these in Wire.begin( sda, scl )

Further reading:

The ESP32 GPIO matrix for port A can set SDL and SCL to any port pin. It's up to the library to accept other pins as alternates. If the library does not allow for pin assignments but does make provisions for software I2C just 'pretend' to the library that you are using software I2C. So far that 'trick' has worked for me.

aarg:
What do you mean, "not standard"? The processor itself has internal hardware for I2C that is hard wired to certain pins. Sometimes there are one or two sets of alternates, but they are fixed. You can't just assign any GPIO.

Well you can to some extent. The SCL and SCA were reversed and the board was made, but with the Espressif toolchain you can use macros to change them, and in Mongoose-OS you can specify this in a configuration file.

6v6gt:
What about simply changing these in Wire.begin( sda, scl )

Further reading:

ESP32 I2C Communication: Set Pins, Multiple Bus Interfaces and Peripherals | Random Nerd Tutorials

I didn't realize that was supported. I'm actually using the Adafruit MCP23017 library and trying to talk to that chip to do some board testing. That library uses the wire library so maybe I can make that work, thank you.

Idahowalker:
The ESP32 GPIO matrix for port A can set SDL and SCL to any port pin. It's up to the library to accept other pins as alternates. If the library does not allow for pin assignments but does make provisions for software I2C just 'pretend' to the library that you are using software I2C. So far that 'trick' has worked for me.

I don't follow...

6v6gt:
What about simply changing these in Wire.begin( sda, scl )

Thanks! This worked. I tossed the library and wrote to the registers directly. Now I can move forward, thanks again.