Closed iothack closed 4 years ago
Hi,
This was a type-o in the example found in the README. GitHub and PyPi have been updated.
The import must use a _ not -, for example
from pigpio_dit import DHT11 # use _ not -
gpio = 23
sensor = DHT11(gpio)
result = sensor.read()
print(result)
Update your copy of pigpio-dht
by pulling from GitHub, or pip install pigpio-dit --upgrade
Closing.
Hi,
I'm getting an error when I;m trying your code in my Pi.
I have done the following:
pi@rpi:~/bin $ sudo pip3 install pigpio-dht
Here is my code:
Here is the error I am getting:
Based on info on the link below, it seems I need to do something extra in order to import this module. https://stackoverflow.com/questions/8350853/how-to-import-module-when-module-name-has-a-dash-or-hyphen-in-it