i have a 4 Pin Amoled screen connected to arduino and everything is working well in prototyping, but when i do use an longer câble to communicate SDA and SCL (about 1.5 meters) it do not work anymore.
Even if i "bypass" the long câble with a short one, it do not work. I have to remove the long and only use the short to make it work .
I2C is sensitive to capacitance which will affect the rise time of the signals; longer cables form a higher capacitance. Putting a short one in parallel makes it even worse. You can try to add external pullup resistors on the SDA and SCL lines; I'm not sure of the values. There are also extenders that buffer the signal.
I2C stands for Inter IC and is meant for connection between components on a PCB, not for long distance !! And anything above approx. 25cm is long distance
6k8 is extremely wimpy. I would choose 2k2 for 5V or perhaps 1k2 for a 3.3V system.
The OLED is probably running on a 400kHz bus.
Whereas a Slave I2C chip on the main pcb is only going to add 10-20pF any long cable might add 100pF or more. RC = 6k8 x 100pF = 680ns. A 400kHz bus is 1250ns per half-cycle.
I think maybe you are trying to solve the wrong problem. You can add as many capacitors as you wish, but the installation will remain prone to noise.
May I propose an alternative solution? How about putting a secondary Arduino right next to the OLED and drive it with very short I2C connections?
Then send the data from the primary arduino to the secondary arduino and offload the display handing to the secondary arduino. You can use software serial or other inter-arduino communications. rs485 perhaps for longer distances in a noisy environment?. Or a wireless link.
I appreciate it will need a big change of code and may not work if you need fast updates to the OLED (not that OLEDs tend to be very fast anyway).
But it would probably solve the I2C noise issue.