Some devices are Master I2C one 2 pins as well as Slave I2C on the SDA / SCL pins.
Problem with the official Wire library is that it tends to crash when you hotplug devices or there is some communication problems.
arduino/Arduino#1476
We should systematically use SoftI2CMaster for Master I2C that has the following interesting flags:
- I2C_PULLUP = 1 meaning that internal pullups should be used
- I2C_CPUFREQ, when changing CPU clock frequency dynamically
- I2C_FASTMODE = 1 meaning that the I2C bus allows speeds up to 400 kHz
- I2C_SLOWMODE = 1 meaning that the I2C bus will allow only up to 25 kHz
- I2C_NOINTERRUPT = 1 in order to prohibit interrupts while
Some devices are Master I2C one 2 pins as well as Slave I2C on the SDA / SCL pins.
Problem with the official Wire library is that it tends to crash when you hotplug devices or there is some communication problems.
arduino/Arduino#1476
We should systematically use SoftI2CMaster for Master I2C that has the following interesting flags: