Hi
I have a project that keeps having problems with the I2C bus. Hardware wise everything is okay. When I load an I2C scanner program everything is fine and the corresponding examples also work.
Something does not seem to work well together.
During a closer analysis I found out that there are different libraries called.
wire.beginn ();
Adafruit_MCP23017.cpp
..
..
void Adafruit_MCP23017 :: begin (uint8_t addr, TwoWire * theWire) {
if (addr> 7) {
addr = 7;
}
i2caddr = addr;
_wire = theWire;
_wire-> begin ();
// set defaults!
..
..
..
Adafruit_BME280.cpp
..
..
bool Adafruit_BME280 :: init () {
// init I2C or SPI sensor interface
if (_cs == -1) {
// I2C
_wire-> begin ();
} else {
..
..
..
My question now is, is this possibly causing interference on the I2C bus?
Hallo
ich habe da ein Projekt in dem immer wieder Probleme mit dem I2C-Bus habe. Hardware mäßig ist alles okay. Wenn ich ein I2C-Scanner Programm lade ist alles in Ordnung und auch die entsprechenden Beispiele funktionieren.
Nur im zusammenspiele funktioniert anscheinend etwas nicht.
Bei ein einer genaueren Analyse habe ich herausgefunden das verschieden Bibliotheken
wire.beginn();
aufgerufen.
Adafruit_MCP23017.cpp
..
..
void Adafruit_MCP23017::begin(uint8_t addr, TwoWire *theWire) {
if (addr > 7) {
addr = 7;
}
i2caddr = addr;
_wire = theWire;
_wire->begin();
// set defaults!
..
..
..
Adafruit_BME280.cpp
..
..
bool Adafruit_BME280::init() {
// init I2C or SPI sensor interface
if (_cs == -1) {
// I2C
_wire->begin();
} else {
..
..
..
Meine Frage ist jetzt, führt das vielleicht zu Störungen auf dem I2C-Bus?




