pull/1/head
Peter Dahlberg 2016-05-21 17:44:25 +02:00
rodzic 6f2b9cb1d8
commit bcb684e5f5
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -24,8 +24,8 @@ print(bme.values)
#### Detailed usage ####
The `values` property is a convenience function that provides a tuple of human-readable string values to quickly check that the sensor is working. In practice, the methods to use are:
The `values` property is a convenience function that provides a tuple of human-readable string values to quickly check that the sensor is working. In practice, the method to use is `read_compensated_data()` which returns a `(temperature, pressure, humidity)`-tuple:
* `get_temperature()`: returns the temperature in hundredths of a degree celsius. For example, the value 2534 indicates a temperature of 25.34 degrees.
* `get_pressure()`: returns the atmospheric pressure. This 32-bit value consists of 24 bits indicating the integer value, and 8 bits indicating the fractional value. To get a value in Pascals, divide the return value by 256. For example, a value of 24674867 indicates 96386.2Pa, or 963.862hPa.
* `get_humidity()`: returns the relative humidity. This 32-bit value consists of 22 bits indicating the integer value, and 10 bits indicating the fractional value. To get a value in %RH, divide the return value by 1024. For example, a value of 47445 indicates 46.333%RH.
* `temperature`: the temperature in hundredths of a degree celsius. For example, the value 2534 indicates a temperature of 25.34 degrees.
* `pressure`: the atmospheric pressure. This 32-bit value consists of 24 bits indicating the integer value, and 8 bits indicating the fractional value. To get a value in Pascals, divide the return value by 256. For example, a value of 24674867 indicates 96386.2Pa, or 963.862hPa.
* `humidity`: the relative humidity. This 32-bit value consists of 22 bits indicating the integer value, and 10 bits indicating the fractional value. To get a value in %RH, divide the return value by 1024. For example, a value of 47445 indicates 46.333%RH.