RobTillaart / DHTNew

Arduino library for DHT11 and DHT22 with automatic sensor recognition
MIT License
98 stars 15 forks source link

Library seems to fail reading DHT22 with 3V3 logic/8Mhz #33

Closed ikatkov closed 3 years ago

ikatkov commented 3 years ago

How to reproduce: Arduino Pro Mini 3v3, 8Mhz 328p Wire as usual, pull up data line to VCC

The library keeps returning -999 for both temp and humidity. The Adafruit DHT lib works fine on the same hardware.

RobTillaart commented 3 years ago

Hi not much time to investigate now. The 8 MHz might be difficult for the way DHTNew clocks in the bits, Adafruit uses a simpler algorithm and analyzes data afterwards while I try to detect errors during the handshake.

Can you run the dhtnew_pulse_diag.ino sketch and post the output?

RobTillaart commented 3 years ago

Please reopen if issue is still relevant