This library is designed to work with devices like the LM335 temperature sensor. There are only two requirements for compatibility: 1) The device must be a sensor device that has an analog voltage output. 2) The physical quantity measured must vary linearly with the analog voltage. The LM335 creates an analog voltage proportional to temperature. It can work very well with this library using the nominal multiplier of 0.0050354 and offset of -273.15 or by providing two user defined calibration points to the constructor. It uses a median filter to remove unwanted noise from ADC readings.
Dependents: mbed_measuring_temperature
Diff: LinearTemp.h
- Revision:
- 2:989048937c77
- Parent:
- 1:7ce89c2ecf05
diff -r 7ce89c2ecf05 -r 989048937c77 LinearTemp.h --- a/LinearTemp.h Sun Dec 23 07:29:42 2012 +0000 +++ b/LinearTemp.h Sun Dec 23 07:32:24 2012 +0000 @@ -72,7 +72,7 @@ #ifdef MBED_OPERATORS /** An operator shorthand for readTemp() to calculate filtered temperature */ - operator int() { + operator float() { return readTemp(); } #endif