diff --git a/MHZ.cpp b/MHZ.cpp index b7942f1..b3081c9 100644 --- a/MHZ.cpp +++ b/MHZ.cpp @@ -14,8 +14,8 @@ const int MHZ_10K = 3; const unsigned long MHZ14A_PREHEATING_TIME = 3L * 60L * 1000L; const unsigned long MHZ19B_PREHEATING_TIME = 3L * 60L * 1000L; -const unsigned long MHZ14A_RESPONSE_TIME = 60 * 1000; -const unsigned long MHZ19B_RESPONSE_TIME = 120 * 1000; +const unsigned long MHZ14A_RESPONSE_TIME = (unsigned long)60 * 1000; +const unsigned long MHZ19B_RESPONSE_TIME = (unsigned long)120 * 1000; const int STATUS_NO_RESPONSE = -2; const int STATUS_CHECKSUM_MISMATCH = -3; @@ -286,7 +286,7 @@ void MHZ::setRange(int range) //only available for MHZ-19B < 1.6 and MH-Z 14a void MHZ::calibrateZero() { - char cmd[9] = {0xFF, 0x01, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78}; + uint8_t cmd[9] = {0xFF, 0x01, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78}; _serial->write(cmd,9); } diff --git a/README.md b/README.md index d4e9491..d478be8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MH-Z14A, MH-Z19B CO2 ... Module -Arduino implementation for MH-Z CO2 sensors such as **MH-Z14A**, **MH-Z18B** (as I didn't find all info in one place). +Arduino implementation for MH-Z CO2 sensors such as **MH-Z14A**, **MH-Z19B** (as I didn't find all info in one place). The sensor is available for ~20 bucks at the usual places.