sparkfun / SparkFun_SCD4x_Arduino_Library

An Arduino library for the Sensirion SCD4x (SCD40 and SCD41) family of CO2 sensors
Other
12 stars 8 forks source link

No connection on ESP8266 since 1.0.4 #7

Open kharar opened 1 year ago

kharar commented 1 year ago

Using SCD4x scd(SCD4x_SENSOR_SCD41); and the following snippet with library 1.1.2 on an ESP8266 gets me a disconnected error

  //Let's call measureSingleShot to start the first conversion
  while (1)
  {
    if (scd.measureSingleShot() == true) break;
    Serial.println("measureSingleShot failed. Is SCD41 disconnected?");
    delay(1000);
  }

And trying with this enabled scd.enableDebugging(); gives me:

SCD4x::measureSingleShot: _sensorType is not SCD4x_SENSOR_SCD41
SCD41's need to be instantiated using: SCD4x mySensor(SCD4x_SENSOR_SCD41)

Everything works with library version 1.0.4