mirror of
https://github.com/sigmasternchen/MH-Z-CO2-Sensors
synced 2025-03-15 06:38:55 +00:00
commit
b14f103251
1 changed files with 1 additions and 1 deletions
2
MHZ.cpp
2
MHZ.cpp
|
@ -243,7 +243,7 @@ int MHZ::readCO2PWM() {
|
|||
if (debug) Serial.print(".");
|
||||
th = pulseIn(_pwmpin, HIGH, 1004000) / 1000;
|
||||
tl = 1004 - th;
|
||||
ppm_pwm = 5000 * (th - 2) / (th + tl - 4);
|
||||
ppm_pwm = 2000 * (th - 2) / (th + tl - 4);
|
||||
} while (th == 0);
|
||||
if (debug) {
|
||||
Serial.print(F("\n # PPM PWM: "));
|
||||
|
|
Loading…
Reference in a new issue