adc_temperature: Add support for linear interpolation of resistances

Add support for performing linear interpolation between a set of
measured temperature/resistance pairs.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-01-21 20:14:49 -05:00
parent fc946c796c
commit 7327394c50
3 changed files with 80 additions and 9 deletions

View file

@ -1051,13 +1051,13 @@
# sections with an "adc_temperature" prefix). This allows one to
# define a custom temperature sensor that measures a voltage on an
# Analog to Digital Converter (ADC) pin and uses linear interpolation
# between a set of configured temperature/voltage measurements to
# determine the temperature. The resulting sensor can be used as a
# sensor_type in a heater section. (For example, if one defines a
# "[adc_temperature my_sensor]" section then one may use a
# "sensor_type: my_sensor" when defining a heater.) Be sure to place
# the sensor section in the config file above its first use in a
# heater section.
# between a set of configured temperature/voltage (or
# temperature/resistance) measurements to determine the
# temperature. The resulting sensor can be used as a sensor_type in a
# heater section. (For example, if one defines a "[adc_temperature
# my_sensor]" section then one may use a "sensor_type: my_sensor" when
# defining a heater.) Be sure to place the sensor section in the
# config file above its first use in a heater section.
#[adc_temperature my_sensor]
#temperature1:
#voltage1:
@ -1067,6 +1067,14 @@
# A set of temperatures (in Celsius) and voltages (in Volts) to use
# as reference when converting a temperature. At least two
# measurements must be provided.
#temperature1:
#resistance1:
#temperature2:
#resistance2:
#...
# Alternatively one may specify a set of temperatures (in Celsius)
# and resistance (in Ohms) to use as reference when converting a
# temperature. At least two measurements must be provided.
# MAXxxxxx serial peripheral interface (SPI) temperature based