I wrote a script to measure temperature of any type of thermistor (not just the 3 available from the firmware). It uses the Steinhart-Hart equation and requires the input of the A, B and C coefficients. Hopefully someone will find this useful
dmm.measure.func = dmm.FUNC_RESISTANCE
display.clear()
display.changescreen(display.SCREEN_USER_SWIPE)
defaultA = 1.027628774E-3
defaultB = 2.393890857E-4
defaultC = 1.555947964E-7
a = display.input.number("Coefficient A", display.NFORMAT_EXPONENT, defaultA)
b = display.input.number("Coefficient B", display.NFORMAT_EXPONENT, defaultB)
c = display.input.number("Coefficient C", display.NFORMAT_EXPONENT, defaultC)
button = display.input.option("Unit", "\19C", "\19F", "\19K")
while (true)
do
logR = math.log(dmm.measure.read())
kelvin = 1. / (a + b * logR + c * (math.pow(logR, 3.)))
celsius = kelvin - 273.15
fahrenheit = (celsius * 9. / 5.) + 32.
if (button == display.BUTTON_OPTION1) or (button == nil) then
text = string.format("%.3f \19C", celsius)
elseif button == display.BUTTON_OPTION2 then
text = string.format("%.3f \19F", fahrenheit)
else
text = string.format("%.3f \19K", kelvin)
end
display.settext(display.TEXT1, text)
end