i2scan.cpp bugfix bus select
This commit is contained in:
parent
0dea735bfb
commit
738543b529
@ -23,7 +23,11 @@ int i2c_scan(void) {
|
|||||||
for (addr = 8; addr <= 119; addr++) {
|
for (addr = 8; addr <= 119; addr++) {
|
||||||
|
|
||||||
// scan i2c bus with no more to 100KHz
|
// 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);
|
Wire.begin(SDA, SCL, 100000);
|
||||||
|
#endif
|
||||||
Wire.beginTransmission(addr);
|
Wire.beginTransmission(addr);
|
||||||
Wire.write(addr);
|
Wire.write(addr);
|
||||||
i2c_ret = Wire.endTransmission();
|
i2c_ret = Wire.endTransmission();
|
||||||
|
Loading…
Reference in New Issue
Block a user