diff --git a/DHT.h b/DHT.h index 400162d..2a3dccf 100644 --- a/DHT.h +++ b/DHT.h @@ -67,6 +67,9 @@ class DHT { class InterruptLock { public: InterruptLock() { +#if defined(ESP8266) + yield(); +#endif #if !defined(ARDUINO_ARCH_NRF52) noInterrupts(); #endif @@ -74,9 +77,11 @@ class InterruptLock { ~InterruptLock() { #if !defined(ARDUINO_ARCH_NRF52) interrupts(); +#endif +#if defined(ESP8266) + yield(); #endif } - }; #endif