Skip to content
This repository was archived by the owner on Nov 12, 2019. It is now read-only.

Commit 27416d2

Browse files
authored
Merge pull request #98 from gunkl/master
Issue #49 - fix long cable read delay on DHT sensor with RPI 1
2 parents 1d36090 + dc3f15e commit 27416d2

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)