I have an LM35DZ which is temperature sensor, properly connected and reading strange values... like 1023.
I've tried almost any code I could find regarding LM35DZ and Arduino, with the same results every time.
After several attempts I tried to measure voltage with multimeter on 2nd pin (Vout) and it was 4.16V. Using this code I also got 4.16V precisely :
float voltage0 = analogRead(A0) * (5.0 / 1023.0); Serial.print(voltage0);
By mistake I ordered 5 pieces instead of one so I tried with all of them and they all give me same result (both on Arduino and voltage measured).
Now I'm confused what is going on and why all of them return the same value?
Here are pictures:
Schematic used http://blog.rastating.com/content/images/2014/Feb/lm35_schem_1_.jpg Update: Sorry on my Bad English, I'll try to explain even more what I've done. As Ricardo told I've tried to remove Arduino out of picture and still got 4.16V, on all 5 of them. (bought them from Ebay- maybe got defective/miscalibrated ones? ) Will buy one in local electronics shop and try with it. Attached schematic picture.