diff --git a/libraries/Wire/src/Wire.cpp b/libraries/Wire/src/Wire.cpp
index 047795f949a..8ac0c25595d 100644
--- a/libraries/Wire/src/Wire.cpp
+++ b/libraries/Wire/src/Wire.cpp
@@ -646,6 +646,8 @@ void TwoWire::onRequestService(uint8_t num, void *arg) {
 #endif /* SOC_I2C_SUPPORT_SLAVE */
 
 TwoWire Wire = TwoWire(0);
+#if SOC_I2C_NUM > 1
 TwoWire Wire1 = TwoWire(1);
+#endif /* SOC_I2C_NUM */
 
 #endif /* SOC_I2C_SUPPORTED */
diff --git a/libraries/Wire/src/Wire.h b/libraries/Wire/src/Wire.h
index fcf94313d52..cf720d48234 100644
--- a/libraries/Wire/src/Wire.h
+++ b/libraries/Wire/src/Wire.h
@@ -144,7 +144,9 @@ class TwoWire : public HardwareI2C {
 };
 
 extern TwoWire Wire;
+#if SOC_I2C_NUM > 1
 extern TwoWire Wire1;
+#endif /* SOC_I2C_NUM */
 
 #endif /* SOC_I2C_SUPPORTED */
 #endif /* TwoWire_h */