diff --git a/tasmota/tasmota_support/support_a_i2c.ino b/tasmota/tasmota_support/support_a_i2c.ino index 0af7450d6..c857240cd 100644 --- a/tasmota/tasmota_support/support_a_i2c.ino +++ b/tasmota/tasmota_support/support_a_i2c.ino @@ -63,7 +63,12 @@ bool I2cBegin(int sda, int scl, uint32_t bus, uint32_t frequency) { #endif // USE_I2C_BUS2_ESP8266 #endif // ESP8266 #ifdef ESP32 +#ifdef USE_I2C_BUS2 TwoWire& myWire = (0 == bus) ? Wire : Wire1; +#else + if (bus > 0) { return false; } + TwoWire& myWire = Wire; +#endif static bool reinit = false; if (reinit) { myWire.end(); } result = myWire.begin(sda, scl, frequency);