@larsks Thanks for taking the time to do bisect to track down the commit. I can see how that commit might have affected the DHT driver. · Issue #6634 · micropython/micropython · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@larsks Thanks for taking the time to do bisect to track down the commit. I can see how that commit might have affected the DHT driver.
Unfortunately I can't reproduce the problem. On an Adafruit Huzzah Feather the DHT code above works just fine for me, on pins 4, 5, 12, 13, 14, 15. First and subsequent measures all work.
I suspect it's an issue with pulling up the DHT's data line. Since it's an open drain pin it should be pulled up to high with a resistor, say 10k Ohm. You can do this with an external resistor, or try the internal one on the esp8266 via:
d=dht.DHT22(Pin(4, Pin.IN, Pin.PULL_UP))
The reason it might have worked before without a pull-up is because the esp8266 pin was glitching when set to open-drain-high and driving the line high for a brief moment, which would have put enough charge on the wire to make it act like it was pulled high. Now it doesn't do that so there needs to be a resistor pulling it up.
@larsks Thanks for taking the time to do bisect to track down the commit. I can see how that commit might have affected the DHT driver.
Unfortunately I can't reproduce the problem. On an Adafruit Huzzah Feather the DHT code above works just fine for me, on pins 4, 5, 12, 13, 14, 15. First and subsequent measures all work.
I suspect it's an issue with pulling up the DHT's data line. Since it's an open drain pin it should be pulled up to high with a resistor, say 10k Ohm. You can do this with an external resistor, or try the internal one on the esp8266 via:
The reason it might have worked before without a pull-up is because the esp8266 pin was glitching when set to open-drain-high and driving the line high for a brief moment, which would have put enough charge on the wire to make it act like it was pulled high. Now it doesn't do that so there needs to be a resistor pulling it up.
Originally posted by @dpgeorge in #4233 (comment)
The text was updated successfully, but these errors were encountered: