The 'kookye'DHT11 tutorial suggests connecting to GPIO14 (TXD) at pin 8. An rpi3B+ and a relay board uses the GPIO14 for programming firmwware per the table:
PIN GPIO CLASS RELAY BOARD FUNCTION
3,5 2,3 SDA,SCL I2C commands
7 4 GPCLK0 Interrupt Handler
8,10 14,15 TXD,RXD Firmware Programming
The Circuit basics tutorial indicates configuring GPIO-4 (GPCLK0) Pin-7:
![enter image description here]()
QUESTIONS
![enter image description here]()
TEST PROCEDURE
Enter this at the command prompt to download the library:
git clone https://github.com/adafruit/Adafruit_Python_DHT.git
Change directories with:
cd Adafruit_Python_DHT
Now enter this:
sudo apt-get install build-essential python-dev
Then install the library with:
sudo python setup.py install
Invoke python and issue commands:
import sys; import Adafruit_DHT
humidity, temperature = Adafruit_DHT.read_retry(11, 37) #GPIO-26 on pin-37
humidity, temperature = Adafruit_DHT.read_retry(11, 26)
Error Messages
humidity, temperature = Adafruit_DHT.read_retry(11, 37) #GPIO-26 on pin-37
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "Adafruit_DHT/common.py", line 94, in read_retry
humidity, temperature = read(sensor, pin, platform)
File "Adafruit_DHT/common.py", line 80, in read
platform = get_platform()
File "Adafruit_DHT/common.py", line 55, in get_platform
from . import Raspberry_Pi_2
File "Adafruit_DHT/Raspberry_Pi_2.py", line 22, in <module>
from . import Raspberry_Pi_2_Driver as driver
ImportError: cannot import name Raspberry_Pi_2_Driver
Retry with GPIO (26) and not PIN (37)
humidity, temperature = Adafruit_DHT.read_retry(11, 26)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "Adafruit_DHT/common.py", line 94, in read_retry
humidity, temperature = read(sensor, pin, platform)
File "Adafruit_DHT/common.py", line 80, in read
platform = get_platform()
File "Adafruit_DHT/common.py", line 55, in get_platform
from . import Raspberry_Pi_2
File "Adafruit_DHT/Raspberry_Pi_2.py", line 22, in <module>
from . import Raspberry_Pi_2_Driver as driver
ImportError: cannot import name Raspberry_Pi_2_Driver