fix sensor type detection

This commit is contained in:
Syping 2021-04-23 13:19:34 +02:00
parent b48eda46de
commit dc073edd01
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ int getdhtstring(int PIN, char* string)
float humid; float humid;
float temp; float temp;
while (1) { 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); sprintf(string, "{\"humidity\": %.1f, \"temp\": %.1f}", humid, temp);
break; break;
} }