Skip to content

Commit 21ae098

Browse files
committed
Update Adafruit_DHT_Driver/Adafruit_DHT.c
Temperature bugfix.
1 parent 7de3615 commit 21ae098

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Adafruit_DHT_Driver/Adafruit_DHT.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ int readDHT(int type, int pin) {
125125
h = data[0] * 256 + data[1];
126126
h /= 10;
127127

128-
f = (data[2] & 0x7F)* 256; + data[3];
128+
f = (data[2] & 0x7F)* 256 + data[3];
129129
f /= 10.0;
130130
if (data[2] & 0x80) f *= -1;
131131
printf("Temp = %.1f *C, Hum = %.1f \%\n", f, h);

0 commit comments

Comments
 (0)