8000 @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
[go: up one dir, main page]

Skip to content

@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. #6634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ViniciusClement opened this issue Nov 19, 2020 · 0 comments

Comments

@ViniciusClement
Copy link

@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.

Originally posted by @dpgeorge in #4233 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0