Having problems getting correct vallues from a PT100 thermal resistor.

Here is our setup:

5v -----> resistor------> Our spark line is here ------> PT100 ------> Ground

Power drains to ground through a resistor, with our analog spark pin we can detect how much power is drained.

This works and gives us an value to read,

however, not in celsius.

so far i know just about the values for the resistance:celsius from here

http://en.wikipedia.org/wiki/Resistance_thermometer.

there is a function which estimates it, i wanna calculate it!.

Found a calculator online

http://www.thermibel.be/documents/pt100/conv-rtd.xml?lang=en

What kind of resistor and math can we use to calculate the temperature?

Thanks in advance,

Erik

PS. ive been at this for 5 hours and tried several functions and examples from the internet, which all of them failed to give a proper reading.

most examples use something like

```
float temp2=(analogRead(A0)*5.0)/1024.0;
temp=(temp2-0.5)*100;
or
// float millivolts = (analogRead(A0) / 1024.0) * 5000;
// float celsius = millivolts/10; // sensor output is 10mV per degree Celsius
```

Both does not give a proper celsius display.