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: IMG_1122

Here is my cabling set up. IMG_0623

IMG_0625

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)

Most upvoted comments

I had the same issue. I added:

[all]
enable_uart=1
core_freq=250

to /boot/config.txt, reboot and /dev/serial0 works.