In Line 49~53, it doesn't set high signal after low signal and wait some time. MCU pulls up voltage and waits for DHT11 response (20-40us).
In Line 73, the range of count (accumulated time) is 26~28, because 26~28 means data "0", If it is longer, it means data "1". But for redundancy, I choose 35 (I test it works well).
Recently, I buy a Raspberry Pi 4B to re-test this error following the document Raspberry Pi Pico C/C++ SDK by UART, this error still exists. It displays:
The print's dislocation may be according to I ssh to raspberry pi. But the data from DHT11 also are 0, and print Bad data.
Hello, I notice when I use the example
gpio/dht_sensor
in right way, Pico can't read data from DHT11. It toke a night and after reading datasheet https://www.mouser.com/datasheet/2/758/DHT11-Technical-Data-Sheet-Translated-Version-1143054.pdf, I find this error according 2 errors:count
(accumulated time) is 26~28, because 26~28 means data "0", If it is longer, it means data "1". But for redundancy, I choose 35 (I test it works well).This is first time I find this error [Why DHT11 not work after some times using C in pico - Raspberry Pi Forums](https://forums.raspberrypi.com/viewtopic.php?t=355462#p2130252), in this post, I use USB and minicom on Mac.
Recently, I buy a Raspberry Pi 4B to re-test this error following the document Raspberry Pi Pico C/C++ SDK by UART, this error still exists. It displays:
The print's dislocation may be according to I ssh to raspberry pi. But the data from DHT11 also are
0
, and printBad data
.After fixing, it displays:
It works well.