Retrieve temperature, CRC value and the time that was required to read the temperature.
Use this function to check a DS18S20 sensor for its temperature in degree Celsius. The CRC value determines whether the transmission from the sensor was correct. The duration that was needed to retrieve the temperature value might get some indication on the noise of the bus. Typically the value should be below one second.
- Parameters
-
pSensorID | Device name of sensor to retrieve the temperature from. |
temperature | The temperature of the sensor. Note that a value of plain 85.000 degree Celsius might refer to the power up default value and might not indicate a correct temperature! |
bCRC | This value determines whether the transmission was correct or not. |
t_duration_ms | This is the time that was required to get the temperature from the sensor. |
- Returns
- True if the device could be found, the temperature could be read and the CRC was correct.
- See also
- For a simple example on how to use Get_DS18x20_Temperature() refer to the demo DS18x20.cpp.
- Note
- This call does not require a prior initialization of the library.