Unable to use DHT on pins 4, 5 & 15
Posted: Sat Mar 11, 2017 9:22 am
Device is ESP-12F (8266).
I am unable to read DHT sensor on PIN 4 & 5, it works OK on pin 0.
I have tested pins 4 & 5 as an input buy pulling high and reading value and as an output by connecting a LED, both work fine and as expected
There is nothing else connected to pins 4 & 5, attempting to measure() on 4 or 5 results in a ETIMEDOUT error:
I have already designed and routed my PCB based on using 2 x dht devices one on 4 and the other on 5 and I would rather not throw it in the bin and re-design the board !
I also just tested on pin 15, that also fails, pins 0 & 2 work ?!
I am unable to read DHT sensor on PIN 4 & 5, it works OK on pin 0.
I have tested pins 4 & 5 as an input buy pulling high and reading value and as an output by connecting a LED, both work fine and as expected
There is nothing else connected to pins 4 & 5, attempting to measure() on 4 or 5 results in a ETIMEDOUT error:
Code: Select all
>>> import dht
>>> import machine
>>> d = dht.DHT22(machine.Pin(4))
>>> d.measure()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "dht.py", line 13, in measure
OSError: [Errno 110] ETIMEDOUT
>>> import dht
>>> import machine
>>> d = dht.DHT22(machine.Pin(5))
>>> d.measure()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "dht.py", line 13, in measure
OSError: [Errno 110] ETIMEDOUT
>>> d = dht.DHT22(machine.Pin(0))
>>> d.measure()
>>> d.temperature()
28.99999
I also just tested on pin 15, that also fails, pins 0 & 2 work ?!