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

Invalid CRC or Not enough bits #2

Closed
xrmb opened this issue Jul 25, 2017 · 2 comments
Closed

Invalid CRC or Not enough bits #2

xrmb opened this issue Jul 25, 2017 · 2 comments

Comments

@xrmb
Copy link

xrmb commented Jul 25, 2017

First of all the code works pretty well and I can easily work around the issue! But sometimes I get random errors like "Invalid CRC" or "Not enough bits". I get what is going on there in the code, I just dont know if it is an issue with my hardware, some timing issue or a sensor issue.

Is that normal?

Thanks in advance.

$dht22 -p 71 -d 1000

Humidity: 44.1 %
Temperature: 29.2 *C
Humidity: 44.0 %
Temperature: 29.2 *C
Humidity: 44.0 %
Temperature: 29.1 *C
Humidity: 44.0 %
Temperature: 29.1 *C
Invalid CRC
Not enough bits: 0
Not enough bits: 0
Not enough bits: 0
Humidity: 44.0 %
Temperature: 29.1 *C
Humidity: 43.9 %
Temperature: 29.1 *C
Humidity: 44.0 %
Temperature: 29.1 *C
Not enough bits: 39
Not enough bits: 0
Not enough bits: 0
Not enough bits: 0
Humidity: 44.0 %
Temperature: 29.1 *C

@ayufan
Copy link
Contributor

ayufan commented Jul 25, 2017 via email

@ayufan ayufan closed this as completed Jul 25, 2017
@xrmb
Copy link
Author

xrmb commented Jul 25, 2017

Would running parts of the code in a "critical section" to avoid context switches solve it? Or would that block to long?

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

2 participants