WifWaf / MH-Z19

For Arduino Boards (&ESP32). Additional Examples/Commands., Hardware/Software Serial
GNU Lesser General Public License v3.0
195 stars 39 forks source link

added int return value #56

Open lefty01 opened 7 months ago

lefty01 commented 7 months ago

added int return value to verify and begin functions to check if sensor connection failed. I found it useful to have some indication whether a sensor might be attached or not . with this change one could use code like this:

  co2Serial.begin(9600);
  if (0 == co2MHZ19.begin(co2Serial)) {
    co2MHZ19OK = true;
    co2MHZ19.autoCalibration();
  }

not sure if you want to integrate this or not?

lefty01 commented 7 months ago

I also noticed that the version string on top of the .h/.cpp files do not match tag and library.properties