 Hi there,
I have a PT1000 Temperature sensor that changes resistance when temperature is changed.
I have found the code below but I cannot call a function called “GetPlatinumRTD();”, the debugger says that I need to declare more variables in void setup.
I have just connected the PT1000 red-wire to A0 & white-wire to GND.

how to call the function please?

debugging:

``````sketch_apr03a.ino: In function 'void loop()':
sketch_apr03a:4: error: too few arguments to function 'float GetPlatinumRTD(float, float)'
sketch_apr03a:4: error: at this point in file
``````
``````void setup() {
}

void loop() {
GetPlatinumRTD();
delay(1000);
}

float GetPlatinumRTD(float R,float R0) {
float A=3.9083E-3;
float B=-5.775E-7;
float T;

R=R/R0;

//T = (0.0-A + sqrt((A*A) - 4.0 * B * (1.0 - R))) / 2.0 * B;
T=0.0-A;
T+=sqrt((A*A) - 4.0 * B * (1.0 - R));
T/=(2.0 * B);

if(T>0&&T<200) {
return T;
}
else {
//T=  (0.0-A - sqrt((A*A) - 4.0 * B * (1.0 - R))) / 2.0 * B;
T=0.0-A;
T-=sqrt((A*A) - 4.0 * B * (1.0 - R));
T/=(2.0 * B);
return T;
}
}
``````

In the topic given below, found the code that seems to be working in older versions of Arduino.
http://arduino.cc/forum/index.php/topic,43605.0.html

You make this call: GetPlatinumRTD(); But that function wants two (float) arguments.

Where are the (float) variables that you want to do the calculation with ?

This is a guide for the PT1000, http://openenergymonitor.org/emon/node/75

Can you forget about the PT1000 and buy a LM35 (analog) or TMP36 (analog) or DS18B20 (digital) ?

Erdin: Can you forget about the PT1000 and buy a LM35 (analog) or TMP36 (analog) or DS18B20 (digital) ?

Done that already!!! DS18B20 is much more better!

Or at least a MAX31865 to interface with the wire.

http://www.maximintegrated.com/datasheet/index.mvp/id/7900/t/al