From dc073edd016a6114a5847061ba372b8e2882a14e Mon Sep 17 00:00:00 2001 From: Syping Date: Fri, 23 Apr 2021 13:19:34 +0200 Subject: [PATCH] fix sensor type detection --- src/dht/linux/libdht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dht/linux/libdht.c b/src/dht/linux/libdht.c index 7d0f4f3..baaab38 100644 --- a/src/dht/linux/libdht.c +++ b/src/dht/linux/libdht.c @@ -8,7 +8,7 @@ int getdhtstring(int PIN, char* string) float humid; float temp; while (1) { - if (pi_2_dht_read(PIN, PIN, &humid, &temp) == DHT_SUCCESS) { + if (pi_2_dht_read(DHT22, PIN, &humid, &temp) == DHT_SUCCESS) { sprintf(string, "{\"humidity\": %.1f, \"temp\": %.1f}", humid, temp); break; }