Controlling a Potentiometer using Arduino 2560

Nobody is able to understand what you're trying to do.

1) You can't measure temperature with a potentiometer. A potentiometers value (resistance) only changes when you turn it. Its used for human interface. Go to these links for more details,

2) For measuring temperature you need temperature sensors. Like LM35 which gives an analog value just like a potentiometer but the value is proportional to the temperature.

Now answer or do the following

1) Post a picture of the potentiometer or temperature sensor. 2) Does the thing you call potentiometer look like the one in the Wikipedia link? 3) Or does it look like a transistor? 4) What is written on it? 5) Post the picture of the circuit or the circuit itself.

If you don't clarify the above we will not be able to help you.

Some servo pot test code. if you have a pot, you can use this type code to see what the pot is reading using the serial monitor.

//zoomkat dual pot/servo test 12-29-12
//view output using the serial monitor

#include <Servo.h> 
Servo myservo1;
Servo myservo2;

int potpin1 = 0;  //analog input pin A0 on arduino board
int potpin2 = 1;

int newval1, oldval1;
int newval2, oldval2;

void setup() 
  Serial.println("testing dual pot servo");  

void loop() 
  newval1 = analogRead(potpin1);           
  newval1 = map(newval1, 0, 1023, 0, 179); 
  if (newval1 < (oldval1-2) || newval1 > (oldval1+2)){  
    Serial.print("1- ");

  newval2 = analogRead(potpin2);
  newval2 = map(newval2, 0, 1023, 0, 179);
  if (newval2 < (oldval2-2) || newval2 > (oldval2+2)){  
    Serial.print("2- ");