kieranblyth:
void loop() {
sensorValue = map(analogRead(sensorPin1),0,600,0,255);
sensorValue2 = map(analogRead(sensorPin2),0,600,0,255); // map the values to a useful range 0-255
....
}
Your second reading may be picking up the residue from the first one after the ADC is switched to the second pin. Try this
sensorValue = analogRead(sensorPin1); // this reading gets discarded
sensorValue = map(analogRead(sensorPin1),0,600,0,255);
sensorValue2 = analogRead(sensorPin2); // this reading gets discarded
sensorValue2 = map(analogRead(sensorPin2),0,600,0,255);
...R