I am reading two temperatures with my Arduino using LM35 and KTY81-210 (http://arduino.cc/playground/Main/Kty81-110) sensors. It works ok, but when I put Ethernet shiled on Arduino and try to read temperature its not working, I get very wrong values. I measured a voltage on LM35 and its about 4V but it should be 0.27V like it was when I didn't use Ethernet shiled. What is wrong here? Why I get wrog data when I put Ethernet shiled on Arduino? I am using Arduino Uno.
Could you provide some more information, like what pins you're using.
If you're using A0 like in the tutorial: That pin is used by the ethernet shield.
Try changing the pin to A2-A5
If you're using the basic code, just change
float read_temp = kty(0);
float read_temp = kty(2);
and connect the sensor to analog pin 2.
Thank you very much for the answer. That was the problem, I was using pin 0 and 1. I was reading on http://arduino.cc/en/Main/ArduinoEthernetShield about Ethernet shield and I didn't read nothing about Ethernet shield using analog pins only for digital pins. Thank you again lyron.
I'm curious, can someone point me in the right direction to where it mentions the ethernet shield on the Arduino uses analogue input 0, (A0)? I use a freetronics EtherTen, which they say as being "100% Arduino compatible with onboard Ethernet". With this EtherTen, I use the first few analogues to read in sensor voltages in my program. The program crunches and does a little pid stuff and makes all this available to see with a http request.
From what I understand, you should be able to use A0 or any of the other analogues with the Ethernet shield installed. Why wouldn't it be mentioned it the description of the Ethernet Shield as posted by uzu007? I wish to be enlightened :~
I use Shieldlist to find info about shields.
According to their info, your shield only uses D10-D13.