I had the following issue when using the package in a loop:
File "/home/pi/Workspace/miwebsitebot/modulos/dht11/__init__.py", line 34, in read
RPi.GPIO.setup(self.__pin, RPi.GPIO.OUT)
RuntimeError: Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)
Solved changing __init__.py. Just add after line 31 the initialization mode. It will result like this:
I had the following issue when using the package in a loop:
Solved changing __init__.py. Just add after line 31 the initialization mode. It will result like this: