i2scan.cpp bugfix bus select

This commit is contained in:
Verkehrsrot 2019-09-07 19:12:23 +02:00
parent 0dea735bfb
commit 738543b529

View File

@ -23,7 +23,11 @@ int i2c_scan(void) {
for (addr = 8; addr <= 119; addr++) {
// scan i2c bus with no more to 100KHz
#ifdef HAS_DISPLAY
Wire.begin(MY_OLED_SDA, MY_OLED_SCL, 100000);
#else
Wire.begin(SDA, SCL, 100000);
#endif
Wire.beginTransmission(addr);
Wire.write(addr);
i2c_ret = Wire.endTransmission();