Browse Source

sensor/dht: increase the delay per DHT22 datasheet

Operating specifications / Communication and signal

"Data-bus's free status is high voltage level. When communication
between MCU and DHT22 begin, program of MCU will transform data-bus's
voltage level from high to low level and this process must beyond at least
**1ms** to ensure DHT22 could detect MCU's signal, then MCU will wait 20-40us for
DHT22's response."
master
Maxim Prokhorov 5 years ago
committed by Max Prokhorov
parent
commit
5ae0eb88ac
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      code/espurna/sensors/DHTSensor.h

+ 1
- 1
code/espurna/sensors/DHTSensor.h View File

@ -149,7 +149,7 @@ class DHTSensor : public BaseSensor {
if ((_type == DHT_CHIP_DHT11) || (_type == DHT_CHIP_DHT12)) {
nice_delay(20);
} else {
delayMicroseconds(500);
delayMicroseconds(1100);
}
digitalWrite(_gpio, HIGH);
delayMicroseconds(40);


Loading…
Cancel
Save