mh_z19 3.1.3 doesn’t work with Raspberry Pi 5 because the dependent RPi.GPIO 0.7.1 doesn’t work with it.
$ python3 -m mh_z19 --pwm
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/var/lib/python/ansible/lib/python3.12/site-packages/mh_z19/__main__.py", line 104, in <module>
print (mh_z19.read_from_pwm(gpio=args.pwm_gpio, range=args.pwm_range))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/lib/python/ansible/lib/python3.12/site-packages/mh_z19/__init__.py", line 222, in read_from_pwm
GPIO.setup(gpio,GPIO.IN)
RuntimeError: Cannot determine SOC peripheral base address
mh_z19 3.1.3 doesn’t work with Raspberry Pi 5 because the dependent RPi.GPIO 0.7.1 doesn’t work with it.
It seems RPi.GPIO is no longer maintained because of no response to the ticket to support RP5. The official RP doc is using gpiozero to access GPIO.