USING I2C2 IN RAK4631 ARDUINO

Hello, Im using arduino bsp firmware for my rak4631 on Windows 11. I currently have a problem since i want to use the I2C2 peripheral for my external RTC module but i cant select it on the wire library. How could I use the I2C_2? or indicate wire.h to use I2C_2?

I cant use I2C_1 because it makes conflict with other pins of my hardware.

Thanks in advance for your support.

Regards,

Cristian

Welcome to the forum @cristian2099

Did you try:

Wire1.begin();

Wire1 is I2C_2.

Alternative try

Wire.setPins(uint8_t pinSDA, uint8_t pinSCL);
Wire.begin();

To use the first I2C instance with different pins.

1 Like

Thanks!!

Wire.setPins(uint8_t pinSDA, uint8_t pinSCL);
Wire.begin();

worked perfect!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.