Skip to content

Raspberry Pi 5 Support #53

@rewse

Description

@rewse

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.

$ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions