mh-z19: Returns null - Need help
Hi there,
first of all thank you for your package. I have recently started playing around with a rpi 4 and wanted to connect a mh-z19b with your python package.
I made sure the serials are available:
serial0 -> ttyS0
serial1 -> ttyAMA0
Enabled i2c However i2c output is empty
And even made sure uart is enabled (as seen on another blog )
When I run sudo python -m mh_z19 I (most of the time) get back
null
Sometimes, however there is also another message:

Here is my cabling set up.


I should mention, that the soldered pins at the mh-z19b where bent a bit due to delivery. But I don’t think (hope) this is a problem.
Do you have any ideas what else I could test to make it work?
Thanks in advance!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (3 by maintainers)
I had the same issue. I added:
to /boot/config.txt, reboot and /dev/serial0 works.