From 911834719fe9391215def18a7a8541ca7608dbb8 Mon Sep 17 00:00:00 2001 From: gimdh Date: Mon, 12 Jun 2023 17:56:26 +0900 Subject: [PATCH] Properly initialize TwoWire --- src/SparkFun_SCD30_Arduino_Library.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SparkFun_SCD30_Arduino_Library.cpp b/src/SparkFun_SCD30_Arduino_Library.cpp index b417fa8..f6af631 100644 --- a/src/SparkFun_SCD30_Arduino_Library.cpp +++ b/src/SparkFun_SCD30_Arduino_Library.cpp @@ -41,6 +41,9 @@ bool SCD30::begin(TwoWire &wirePort, bool autoCalibrate, bool measBegin) { _i2cPort = &wirePort; // Grab which port the user wants us to use + #ifndef USE_TEENSY3_I2C_LIB + _i2cPort->begin(); + #endif /* Especially during obtaining the ACK BIT after a byte sent the SCD30 is using clock stretching (but NOT only there)! * The need for clock stretching is described in the Sensirion_CO2_Sensors_SCD30_Interface_Description.pdf *