UedaTakeyuki / mh-z19

Read CO2 concentration from mh-z19 sensor on the Raspberry Pi & handle it. Detect Raspberry Pi model automatically and read the value from an appropriate serial device.
MIT License
182 stars 37 forks source link

untested zero point calibration command seems to be working as expected #27

Closed richteas75 closed 3 years ago

richteas75 commented 3 years ago

As requested on https://github.com/UedaTakeyuki/mh-z19/blob/master/pypi/README.md, I'd like to report that the zero point calibration function seems to be working as expected. When called e.g. by

sudo python -m mh_z19 --zero_point_calibration

the current CO2 concentration is set to represent 400 ppm CO2. This was checked in the following way:

  1. calling sudo python -m mh_z19 --all showed a reading of more than 800 ppm.
  2. calling
    sudo python -m mh_z19 --zero_point_calibration returned a message saying that ZERO point calibration was carried out.
  3. immediately thereafter, without changing, calling again: sudo python -m mh_z19 --all returned a reading close to 400 ppm.

Tested using a mh_z19b device connected to a Raspberry Pi Zero W, purchased in the fall of 2020.

UedaTakeyuki commented 3 years ago

Hi richteas75,

I really appreciate your report! Thank you!

albielew commented 3 years ago

Did the same thing with Pi3 before calibration it was 1800 after calibration it was 403

UedaTakeyuki commented 3 years ago

Hi albielew, Thank you for your report!