Skip to content

Commit dc3f15e

Browse files
committed
Issue adafruit#49 - fix long cable read delay on DHT sensor with RPI 1
1 parent a609d7d commit dc3f15e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/Raspberry_Pi/pi_dht_read.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int pi_dht_read(int type, int pin, float* humidity, float* temperature) {
7272
// Set pin at input.
7373
pi_mmio_set_input(pin);
7474
// Need a very short delay before reading pins or else value is sometimes still low.
75-
for (volatile int i = 0; i < 50; ++i) {
75+
for (volatile int i = 0; i < 500; ++i) {
7676
}
7777

7878
// Wait for DHT to pull pin low.

0 commit comments

Comments
 (0)