Skip to content
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

dhtxx example not reading the 40bits from sensor #21

Open
EddyTheCo opened this issue Sep 4, 2023 · 0 comments
Open

dhtxx example not reading the 40bits from sensor #21

EddyTheCo opened this issue Sep 4, 2023 · 0 comments

Comments

@EddyTheCo
Copy link

I am using a DHT11 module.
Also created a class to communicate with it using the c API of this project.

I am quite new to gpio and pulses but I have followed this documentation.
When using my testprogram in a raspberry pi, I see that the sensor sends the data following the time between edges.
The library measures correctly times of around 78 microsecs for 0 bit and 124 microsecs for 1 bit.
The thing is that my class does not get never to read the 40 bits the sensor should send.
My class is implemented following your dhtxx.c example, but in the example it seems it is not mandatory to get the 40 bits.
How this works then?

The thing is that I have tried many things, changing the configuration and times but the checksum of the data is rarely correct(1 of 256 times is correct=>random).

It is anyone who uses it the dhtxx.c example with good results.
I have also compiled the example and return always "DHT_BAD_CHECKSUM".
I would appreciate any hint on the problem.

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