i2c Some general questions

Trouble with the I2C bus is often caused by:

  • Arduino Due (wrong onboard pullup resistors, no slew rate limit).
  • OLED displays (not 100% compatible).
  • Long wires.
  • Crosstalk between SDA and SCL.
  • Voltage level mismatch.
  • Wrong use of the Wire library.
  • Too much or too little pullup.

With long cables (longer than 50cm) there is extra capacitance between SDA and GND and between SCL and GND. You can lower the clock speed for that. Crosstalk between SDA and SCL is worse.

As far as I know, the OLED displays are 3.3V, and if the SDA and SCL have no level shifters, then they should be connected to a 3.3V I2C bus. The Adafruit OLED displays have level shifters. OLED displays are known to cause I2C bus troubles.

We use the term "upload" to write a new sketch in the Arduino and we use the term "burn" when writing a new bootloader in the Arduino.