Skip to content

Commit 5c691e4

Browse files
authored
Update SHT31.java
1 parent 0faf35e commit 5c691e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Java/SHT31.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static void main(String args[]) throws Exception
3232
//Convert the data
3333
double cTemp = ((((data[0] & 0xFF) * 256) + (data[1] & 0xFF)) * 175.0) / 65535.0 - 45.0;
3434
double fTemp = ((315 * cTemp) / 65535) - 49;
35-
double humidity = (((data[3] & 0xFF) * 256) + (data[4] & 0xFF)) * 100.0) / 65535.0;
35+
double humidity = ((((data[3] & 0xFF) * 256) + (data[4] & 0xFF)) * 100.0) / 65535.0;
3636

3737
//Output data to screen
3838
System.out.printf("Temperature in Celsius : %.2f C %n", cTemp);

0 commit comments

Comments
 (0)