File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,10 @@ bool DHT::read(bool force) {
155155 // Reset 40 bits of received data to zero.
156156 data[0 ] = data[1 ] = data[2 ] = data[3 ] = data[4 ] = 0 ;
157157
158+ #if defined(ESP8266)
159+ yield (); // Handle WiFi / reset software watchdog
160+ #endif
161+
158162 // Send start signal. See DHT datasheet for full signal diagram:
159163 // http://www.adafruit.com/datasheets/Digital%20humidity%20and%20temperature%20sensor%20AM2302.pdf
160164
Original file line number Diff line number Diff line change @@ -67,19 +67,13 @@ class DHT {
6767class InterruptLock {
6868 public:
6969 InterruptLock () {
70- #if defined(ESP8266)
71- yield ();
72- #endif
7370#if !defined(ARDUINO_ARCH_NRF52)
7471 noInterrupts ();
7572#endif
7673 }
7774 ~InterruptLock () {
7875#if !defined(ARDUINO_ARCH_NRF52)
7976 interrupts ();
80- #endif
81- #if defined(ESP8266)
82- yield ();
8377#endif
8478 }
8579};
Original file line number Diff line number Diff line change 11name =DHT sensor library
2- version =1.3.3
2+ version =1.3.4
33author =Adafruit
44maintainer =Adafruit <info@adafruit.com>
55sentence =Arduino library for DHT11, DHT22, etc Temp & Humidity Sensors
You can’t perform that action at this time.
0 commit comments