fix sensor type detection
This commit is contained in:
parent
b48eda46de
commit
dc073edd01
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue