|
@ -137,13 +137,14 @@ class DHTSensor : public BaseSensor { |
|
|
unsigned char byteInx = 0; |
|
|
unsigned char byteInx = 0; |
|
|
unsigned char bitInx = 7; |
|
|
unsigned char bitInx = 7; |
|
|
|
|
|
|
|
|
|
|
|
pinMode(_gpio, OUTPUT); |
|
|
|
|
|
|
|
|
// Send start signal to DHT sensor |
|
|
// Send start signal to DHT sensor |
|
|
if (++_errors > DHT_MAX_ERRORS) { |
|
|
if (++_errors > DHT_MAX_ERRORS) { |
|
|
_errors = 0; |
|
|
_errors = 0; |
|
|
digitalWrite(_gpio, HIGH); |
|
|
digitalWrite(_gpio, HIGH); |
|
|
nice_delay(250); |
|
|
nice_delay(250); |
|
|
} |
|
|
} |
|
|
pinMode(_gpio, OUTPUT); |
|
|
|
|
|
noInterrupts(); |
|
|
noInterrupts(); |
|
|
digitalWrite(_gpio, LOW); |
|
|
digitalWrite(_gpio, LOW); |
|
|
if ((_type == DHT_CHIP_DHT11) || (_type == DHT_CHIP_DHT12)) { |
|
|
if ((_type == DHT_CHIP_DHT11) || (_type == DHT_CHIP_DHT12)) { |
|
|