Multiple analog Inputs wrong reading.

Hello i am trying to control a reference with a potentiometer and at the same time i want to read the temperature using a LM35 sensor( The problem is both readings work fine individual.When paired the temperature reading goes wrong.).
I tried using delays between the two readings ,nothing changed.(I've read somewhere that it might be because the multiplexing time ).

I need both those readings because i send them through the serial port.

It seems arduino can't read simultaneosly multiple inputs.

I think the delay should have worked, but try taking each reading twice and throw-away the 1st reading.

The problem is both readings work fine individual. When paired the temperature reading goes wrong.).

Is the temperature reading 2nd where there may not be enough settling time? If you read the temperature first, does that make the temperature OK but give you reference errors?

When you read them individually, are you changing the hardware or only the software?

...You may have a software bug or a hardware/wiring error.

It still doesn't seem to work.I need to be able to control the reference .Since i encountered serious problems using visual studio (i would need to both send to arduino the reference and receive the sensor value through the serial port-and i understood that i need to do a multithreading program,else the serial jams) i thought i can control manually the reference with a potentiometer.

I used a timer1 interrupt which uses the "isr" function

void isr
{
k++;
flag_afis=1
}
void loop
{
if(flag_afis)
temp=analogRead(A0);
val=analogRead(A5);
temp =temp* 0.48828125;
ref=val*(65.5/1023.0);
Serial.print("ref: ");
Serial.print(ref);
Serial.print(" yk: ");
Serial.print(temp);
flag_afis=0;
}
}
[\code]