i2c / UART

Hello - I have a project on which I need to interface with other devices.

I have 2 type of devices to talked from arduino. Those devices have only a 3 wires connector (data1, data2, GND). Device A is i2c and Device B is rs232. The ardunio will connect to only one type of device at time.

So my question is? Is it possible to wire the input to the i2c and UART pins at the same time and in the arduino I choose the port to listen? is it ok to have the signal on both ports at the same time?

Or should I better put a switch to only send the signal to the correct port? I'm trying to avoid the switch and control everything in software.

Also it would've being nice if the i2c pins could work with the software serial but I think PC4 and PC5 on the atmega don't work as a GPIO.

Any recommendations are appreciated.

I2C uses pins A4 and A5. The async serial uses pins D0 and D1.

So, you can connect both devices, and let the Arduino software choose between them.

Ran