求教 DHT22新手
最近用万博网页版登陆页派4B 链接 DHT22读温湿度,但总是报错如下这是怎么回事Python 3.7.3 (/usr/bin/python3)>>> %Run HVACDetectByDHT22.pyTraceback (most recent call last):File "/home/pi/Adafruit_Python_DHT/HVACDetectByDHT22.py", line 4, in <module> humidity,temperature=Adafruit_DHT.read_retry(Adafruit_DHT.DHT22,pin)File "/home/pi/Adafruit_Python_DHT/Adafruit_DHT/common.py", line 94, in read_retry humidity, temperature = read(sensor, pin, platform)File "/home/pi/Adafruit_Python_DHT/Adafruit_DHT/common.py", line 80, in read platform = get_platform()File "/home/pi/Adafruit_Python_DHT/Adafruit_DHT/common.py", line 55, in get_platform from . import Raspberry_Pi_2File "/home/pi/Adafruit_Python_DHT/Adafruit_DHT/Raspberry_Pi_2.py", line 22, in <module> from . import Raspberry_Pi_2_Driver as driverImportError: cannot import name 'Raspberry_Pi_2_Driver' from 'Adafruit_DHT' (/home/pi/Adafruit_Python_DHT/Adafruit_DHT/__init__.py)
页:
[1]