just to let you know that I bought a pack of 5 LM35DZ sensors from ebay (http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=140544658004&ssPageName=STRK:MEWNX:IT
and that only 1 is reporting "somehow" a decent temperature. Another one is reporting a temperature 10 degrees under compare to the first one, and the 3 others are simply not reporting anything.
the code i'm using is the one below and it has been proven working fine as per another thread and one of my sensor:
Serial.begin(9600); // start serial communication
val = analogRead(1);
sample_avg = sample_avg + (val - sample_avg) / sample_count;
temp=(1.1 * sample_avg * 100.0) / 1024.0;
just so you know, being cheap and getting crap from china out of ebay is not helping your case! I'm learning the hard way.