We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0faf35e commit 5c691e4Copy full SHA for 5c691e4
1 file changed
Java/SHT31.java
@@ -32,7 +32,7 @@ public static void main(String args[]) throws Exception
32
//Convert the data
33
double cTemp = ((((data[0] & 0xFF) * 256) + (data[1] & 0xFF)) * 175.0) / 65535.0 - 45.0;
34
double fTemp = ((315 * cTemp) / 65535) - 49;
35
- double humidity = (((data[3] & 0xFF) * 256) + (data[4] & 0xFF)) * 100.0) / 65535.0;
+ double humidity = ((((data[3] & 0xFF) * 256) + (data[4] & 0xFF)) * 100.0) / 65535.0;
36
37
//Output data to screen
38
System.out.printf("Temperature in Celsius : %.2f C %n", cTemp);
0 commit comments