Imp and a Thermistor is not reading ADC properly

Hello, I am new to Imp development. I just received my Imp last night. I was trying to do a simple thermistor read using calibration curves I had developed using an Arduino. A thermistor is basically a temperature dependent resistor. Therefore I am reading the voltage divide between it and a 10k resistor. Using a multimeter on pin1, my hardware is working exactly as it should. The Imp is reading ~5200 ADC and is not changing with changing temperature/voltage. Can anyone tell me what I am doing wrong? Here is my code:

`// Read a thermistor and convert to temperature example
local output = OutputPort(“Temperature”, “number”);
function ThermistorCalc(rawADC)
if(rawADC > 0)
local Rthermistor;
local Rln;
local temperature;
local A = 0.00009828;
local B = -0.00253126;
local C = 0.02274547;
local D = -0.06718690;
Rthermistor = ((65535 * 10000 / rawADC) - 10000);
Rln = math.log(Rthermistor);
temperature = 1 / (Amath.pow(Rln,3) + Bmath.pow(Rln,2) + C*Rln + D);
return temperature;
} else {
return 0;


function loop()
local temperature = ThermistorCalc(;
server.log(;“Turkey: “+format(”%3.1fF”, temperature));
output.set(format("%3.1f", temperature));

imp.configure(“Thermistor Read 1”,[],[output]);


I think I found the issue. Pin 1 on my Imp or April clone from Sparkfun is not working. I switched it to pin 7 and was able to monitor the temperature of my turkey from COSM.

Is there some way I can test to see if my Imp or my breakout board has an issue?

Maybe turn pin 1 into an output and drive it high and low, then check to see if it’s coming out on the breakout?

I followed your suggestion. Turning your blink-o-matic into an Imp tester on pins 1 and 5. I found that there is a connection issue inside the SD connector on the breakout board. I am not certain which connector it is, but this is the April Breakout sold by Sparkfun. Slight pressure on the board to my soldered connectors produces no change. Slight pressure on the imp into the socket completes the connection and makes the blink-o-matic work properly. Pin 5 works correctly without any manipulation. Thought I would put this out here in case someone else runs into an issue.

Thanks for sharing. If it is indeed the board, hopefully it’s a rarity. That being said, hopefully you can get a new board from SparkFun.