Skip to content

DHT22/AM2302 example #81

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TazerReloaded
Copy link

@TazerReloaded TazerReloaded commented Dec 5, 2021

I just wrote this function for my printer enclosure, which has 2 DHT22s installed.
Works almost every time, sometimes it runs into a timeout, but that's likely due to long wires and the very strict timing requirements of those sensors. Communication protocol from the sensor datasheet, algorithm entirely written by me.
Tested on a Raspberry Pi 3 Model B, should work on all variants. Don't forget the resistor (4.7k to 10k) between Data and VCC if your sensor hasn't one built in!

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

Successfully merging this pull request may close these issues.

1 participant