Hey,

I pretty much ended up porting the whole code to Python and tried running it with the input that you gave. I am getting the output as 25.6.

Can you add the GrovePi library to it and replace inp0 by analogRead(0) and inp1 by analogRead(1) and run the code to see if it works for you.

```
import math
import time
VOL_OFFSET = 350.0
AMP_AV = 54.16
def getThmc(i0,i1):
tempRoom = getRoomTmp(i0)
vol = getThmcVol(i1)
tempThmc = K_VtoT(vol) + tempRoom
return tempThmc;
def getRoomTmp(aread):
a = aread*50.0/33;
resistance=(float)(1023-a)*10000/a;
temperature=1/(math.log(resistance/10000)/3975+1/298.15)-273.15;
return temperature;
def getThmcVol(aread):
vout = aread/1023.0*5.0*1000
vin = (vout - VOL_OFFSET)/AMP_AV
return (vin)
def K_VtoT( mV):
i = 0
value = 0
if(mV >= -6.478 and mV < 0):
Var_VtoT_K=[0, 2.5173462e1, -1.1662878, -1.0833638, -8.9773540/1e1, -3.7342377/1e1,-8.6632643/1e2, -1.0450598/1e2, -5.1920577/1e4]
value = Var_VtoT_K[8]
for i in range(8,0,-1):
value = mV * value + Var_VtoT_K[i-1]
elif(mV >= 0 and mV < 20.644):
Var_VtoT_K=[0, 2.508355e1, 7.860106/1e2, -2.503131/1e1, 8.315270/1e2,-1.228034/1e2, 9.804036/1e4, -4.413030/1e5, 1.057734/1e6, -1.052755/1e8]
value = Var_VtoT_K[9]
for i in range(9,0,-1):
value = mV * value + Var_VtoT_K[i-1]
elif(mV >= 20.644 and mV <= 54.900):
Var_VtoT_K=[-1.318058e2, 4.830222e1, -1.646031, 5.464731/1e2, -9.650715/1e4,8.802193/1e6, -3.110810/1e8]
value = Var_VtoT_K[6]
for i in range(6,0,-1):
value = mV * value + Var_VtoT_K[i-1]
return value
while True:
inp0=69
inp1=386
print getThmc(inp1,inp0)
time.sleep(1)
```

Do let me know how it goes.

-Karan