I2C pins SDA to SCL and SCL to SDA

Hi, I switched SDA and SCL pins during PCB production. I control Fram and LCD via I2C bus. Is it easy to switch software pins? that is, A4 - >> SCL and A5 --- >> SDA


This is hardware inside the chip.

I know, but there is a softwire library. I don't know how to implement it in the LiquidCrystal_I2C and Adafruit_EEPROM_I2C libraries

I'm afraid you need to cut tracks and use wires to correct the mistake, or order more, corrected boards.

Here is a list of software I2C libraries: https://github.com/Testato/SoftwareWire/wiki/Arduino-I2C-libraries.

The worst case is that you have to edit the libraries and replace 'Wire' with something else.

The SoftwareWire is part of the TwoWire family, and this Adafruit library can set a I2C library from the TwoWire family: https://github.com/adafruit/Adafruit_FRAM_I2C/blob/master/Adafruit_EEPROM_I2C.h#L27.

There are (too) many LiquidCrystal_I2C libraries. I don't know which one you use.

There is a discussion at the moment that any I2C library should be able to select and even multiple I2C libraries together. It can be done with templates or pointers or overriding functions. Making a library part of the TwoWire family has advantages and disadvantages. So far, I can't even tell in which direction it goes or should go.

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