I'm using LM34 Temp Sensors. When the sensors are connected directly to the Arduino Mega I get thh proper temperature readings. When I extend theLM34 with 18-3 solid copper wire about 20 feet I get erratic readings. I put the LM34 back at the Arduino the readings are stable. No mater what analog port I use I get the same thing.
I am using this code to extract the info from the LM34.
int rawvoltage0 = analogRead(analogPin0);
delay(30);
float millivolts0 = (rawvoltage0/1024.0)*5000;
float t1 = millivolts0/10;