mirror of
https://github.com/adafruit/DHT-sensor-library.git
synced 2023-10-23 22:20:38 +03:00
Resolve issue #20 by moving delay after 2 second read check to make read return quickly.
This commit is contained in:
@ -25,6 +25,9 @@ void setup() {
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// Wait a few seconds between measurements.
|
||||
delay(2000);
|
||||
|
||||
// Reading temperature or humidity takes about 250 milliseconds!
|
||||
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
|
||||
float h = dht.readHumidity();
|
||||
|
Reference in New Issue
Block a user