winlinvip / SimpleDHT

Simple, Stable and Fast Arduino Temp & Humidity Sensors for DHT11 and DHT22. http://learn.adafruit.com/dht
MIT License
144 stars 61 forks source link

DHT22 reading doesn't work when WiFi switched off #47

Closed weinerg closed 2 years ago

weinerg commented 3 years ago

Hi, I changed from version 1.0.12 to 1.0.14 and now the reading of values from DHT22 doesn't work anymore, when Wifi is switchde off.

I use ESP8266.

SimpleDHT22 dht22(DHTPIN);
...
WiFi.mode( WIFI_OFF );
WiFi.forceSleepBegin();
delay( 1 );
...
err = SimpleDHTErrSuccess;
if ((err = dht22.read2(&temp, &hum, NULL)) != SimpleDHTErrSuccess)
{

Without the 2nd part all works fine also with v1.0.14, but when using the 2nd part, it only work with v1.0.12.

winlinvip commented 2 years ago

I have reverted the 1.0.14

weinerg commented 2 years ago

Actually the problem happens with any version greater than 1.0.12.