Peter_n:
5 ft = 1.52 metersThat is long for I2C. It means that the SDA and SCL might cause noise to each other, and perhaps also from the power wires to SDA and SCL.
You need to select the wires in cable for SDA and SCL that has the least influence on each other.A single wire (not in a cable) for SDA and a single wire for SCL free in the air would be very ugly, but that would work.
As far as I know, the Arduino Wire library has some timeouts, but it is not full proof against I2C bus errors. I have seen a number of propositions to improve it, but none of those are implemented in the library yet.
The I2C is designed to be used within a pcb board, it was never designed to extend it into a cable.
Oh
Well, that explains why I didn't have problems during testing, and why I never have problems with my RTC. It's good to have a definite answer that this can't work though, that way I don't waste time trying to figure out what might be wrong.
Unfortunately with this aquarium controller I need that wire to be that length, and I also need this to be reliable, because if it ever freezes in the "Heater on" position my fish are in trouble.
Do I have any other options? Other serial interfaces maybe? Going from the parallel interface to the serial freed up so many data pins on my somewhat limited UNO, I'd have to remove some nice functionality if I needed to go back.
Thank you!
Whiskey