-
Notifications
You must be signed in to change notification settings - Fork 17
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
Error Timeout #4
Comments
@pdgilbert can you try increasing the |
In the file src/read.rs there are four lines
The 100 is the
I can change that to
This also has no effect other than to slow down the repetition of |
Hi @pdgilbert, Until at some point I had a realization. The Changing your command to Let me know if that solved the issue for you too. Edit: Ok, apparently I spoke too soon. I reverted the changes I made to the code and it stopped working again. I will try to find what changed. I'll come back to you. Edit2: My mistake, when reverting the code I aslo reverted back to the old pin which is not the same as in my setup. |
@pdgilbert Sorry, wasn't a good suggestion. Got it in my head that I may have misread the timing in the datasheet when I made a change in that PR but the timing is correct. @azerupi Thanks for taking a look, you saved me having to hook up my sensor 🙂 |
Ok, I can confirm that adding |
I have now tested running with
The I have document most of this in comments in the A version of this example is reported at https://pdgilbert.github.io/eg_stm_hal/ along with other examples. The results reported there use current git versions of the hals whereas results above use release versions. (I will update the report to indicate the example runs.) |
I forked
dht-sensor
and have been adding an example that should work with several HALs and several MCUs. It also has a feature to use DHT11 or DHT22. So far, it builds with HALsstm32f0xx , stm32f1xx , stm32f3xx , stm32f4xx , stm32h7xx , stm32l0xx , stm32l1xx
and on MCUsstm32f042, stm32f030xc, stm32f103, stm32f100, stm32f101, stm32f303xc, stm32f401, stm32f411, stm32f411, stm32h742, stm32l0x2, stm32l100, stm32l151
.Unfortunately I forked after a change that seem to have broken something. Using the suggestion of @azerupi in #1 to pull the pin high before initializing, my example ran on stm32f401 with DHT11 using c18aaea. With DHT22 (actually an AM2302) it crashed giving
With the next commit, 28927cd, both the DHT11 and DHT22 give repeated 'Error Timeout' messages on all MCUs I have tried (stm32f103, stm32f401, stm32f411).
Any ideas?
The text was updated successfully, but these errors were encountered: