Rock5B(12)MH-Z19C(1)
温度計もつなげたので、CO2センサーを接続と思ったらトラブルに
sudo apt install python3-rpi.gpio
sudo pip3 install mh-z19
よし、実行
sudo python3 -m mh_z19
Go
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.10/runpy.py", line 146, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details
__import__(pkg_name)
File "/usr/local/lib/python3.10/dist-packages/mh_z19/__init__.py", line 15, in <module>
import mh_z19.pwm as pwm
File "/usr/local/lib/python3.10/dist-packages/mh_z19/pwm.py", line 6, in <module>
import RPi.GPIO as GPIO
File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
何と言うことか!!!!
コメント
コメントを投稿