UNO R4 Minima second I2C bus how to define?

Hello

In a new project with Arduino UNO R4 Minima, I would like to have two separated I2C buses.
I don't want to use UNO R4 WiFi or I2C multiplexer. I just want to use the capabilities of the processor

How to define the second I2C bus to use like the QWIIC connector on the UNO R4 WiFi?

RA4M1 can remap I2C0 to unused pins 1, 2 (P400, P401)
{ BSP_IO_PORT_04_PIN_00, P400 }, /* (26) D26 QWIC SCL /.
{ BSP_IO_PORT_04_PIN_01, P401 }, /
(27) D27 QWIC SDA */.

or I2C1 to XTAL pins 9,10 (P212, P213) or unused 22,23 (P206,P205)

I already have the QWIIC connector and pull-up resistors added. But I have no idea how to change the *.h, *.c files to define the second I2C1 or remap I2C0 interface directly in the program.

Can Someone please help me?

You might simply try something like:

#define WIRE1_SCL_PIN 0
#define WIRE1_SDA_PIN 1
TwoWire Wire1(WIRE1_SCL_PIN, WIRE1_SDA_PIN);

...
Wire1.begin()

Or any other pair of SCL/SDA pins that are on the same hardware SCI.

Minima WIFI I/O ports LQFP64 Power, System, Clock,
Debug, CAC, VBATT
Interrupt AGT GPT_OPS, POEG GPT RTC USBFS,CAN SCI IIC SPI SSIE ADC14 DAC12, OPAMP ACMPLP SLCDC CTSU
0 0 P301 31 IRQ6 AGTIO0 GTOULO GTIOC4B RXD2/
MISO2/
SCL2
CTS9_
RTS9/
SS9
SSLB2 SEG01/
COM5
TS09
1 1 P302 30 IRQ5 GTOUUP GTIOC4A TXD2/
MOSI2/
SDA2
SSLB3 SEG02/
COM6
TS08

EDIT: It is probably obvious, but if you use pins 0 and 1 for this, you can not use them for Serial1.

Thank You.
Yes, I found such a solution before on the forum and of course it works.
But I'm more interested in using the unconnected pins than blocking another already used ones :slight_smile:
This solution also allows you to unlock the ADC on the A4, A5, and use I2C0 on 0, 1 at the same time.

Is there any chance to solve the I2C problem on processor pins 1,2 of R4 Minima?