For a few weeks now, I've been torturing myself trying to get an AM2302 sensor to display the readings to my SSH terminal and eventually I want to use a 16 x 2 LCD screen with my raspberry pi. I have found many sites that have guides on how to do both and have tried them all. The code uses the Adafruit dht library shown here: https://github.com/adafruit/Adafruit_Py ... /README.md
When I try to run it, I get this:
Code: Select all
Traceback (most recent call last):
File "/home/pi/humidity.py", line 7, in <module>
humidity, temperature = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN)
File "/usr/local/lib/python3.7/dist-packages/Adafruit_DHT/common.py", line 94, in read_retry
humidity, temperature = read(sensor, pin, platform)
File "/usr/local/lib/python3.7/dist-packages/Adafruit_DHT/common.py", line 80, in read
platform = get_platform()
File "/usr/local/lib/python3.7/dist-packages/Adafruit_DHT/common.py", line 60, in get_platform
from . import Beaglebone_Black
File "/usr/local/lib/python3.7/dist-packages/Adafruit_DHT/Beaglebone_Black.py", line 24, in <module>
from . import Beaglebone_Black_Driver as driver
ImportError: cannot import name 'Beaglebone_Black_Driver' from 'Adafruit_DHT' (/usr/local/lib/python3.7/dist-packages/Adafruit_DHT/__init__.py)
Can anyone make any sense of this? I checked and the common.py file is where it should be.
Thank you in advance,
Bob