Thank you for your great job and this library!
Some others reports wrong PWM outputs vs UART outputs. This belongs of the range of the NDIR sensor.
If I change the range to 5000ppm the PWM output is verry similar to the UART.
Can you expand the lib to set the range?
I found some hints in the source:
enum MHZ19_PWM_DATA { CALC_2000_PPM, CALC_5000_PPM };
And I changed this in MHZ19.h to 5000. After that, the PWM value seems right:
From:
// Pwm Data Flag uint8_t PWM_DATA_SELECT = MHZ19_PWM_DATA::CALC_2000_PPM;
To:
// Pwm Data Flag uint8_t PWM_DATA_SELECT = MHZ19_PWM_DATA::CALC_5000_PPM;
Thank you for your great job and this library! Some others reports wrong PWM outputs vs UART outputs. This belongs of the range of the NDIR sensor. If I change the range to 5000ppm the PWM output is verry similar to the UART. Can you expand the lib to set the range? I found some hints in the source:
enum MHZ19_PWM_DATA { CALC_2000_PPM, CALC_5000_PPM };
And I changed this in MHZ19.h to 5000. After that, the PWM value seems right: From:// Pwm Data Flag uint8_t PWM_DATA_SELECT = MHZ19_PWM_DATA::CALC_2000_PPM;
To:// Pwm Data Flag uint8_t PWM_DATA_SELECT = MHZ19_PWM_DATA::CALC_5000_PPM;
Thank you!