The Arduino only hjas one ADC which is multiplexed. If readings differ too much they interfere.
solutions:
* do double readings and ignore the first (see below)
* do multiple readings and average them (exercise for you

* do a running average e.g. temp = (2 * analogRead() + 14 *temp) / 16;
* take care there is enough time between the readings (move reading of light after Serial prints (temp)
int tempPin = A5;//temp sensor
int lightPin = A0;//photoresistor, hooked up between A0 and ground - pulled high
int light = 0;
int temp = 0;
void setup() {
Serial.begin(300);
pinMode(lightPin, INPUT);
pinMode(tempPin, INPUT);
digitalWrite(lightPin, HIGH);// pull photoresistor high
}
void loop()
{
// read sensors
analogRead(tempPin);
temp = analogRead(tempPin);
analogRead(lightPin);
light = analogRead(lightPin);
//send data to computer for graphing
Serial.print("t");
Serial.print(temp, DEC);
Serial.print("l");
Serial.print(light, DEC);
delay(100);
}
Thanks, the code works perfectly but I'm still not really understanding the problem. This is how I understand it: I tell the arduino to read a pin, it sends the voltage through the ADC and stores the number it gets in the ram, then it clears the ADC and switches to the next pin...
So how could there be interference in the values?
Also, "take care there is enough time between the readings (move reading of light after Serial prints (temp)"
I tried that and it worked aswell, yet if I use my original code with a very generous 100ms delay(far more than serial printing) between reading the temp pin and the light pin I get the same interference.