Go Down

Topic: LM 35 DZ + Arduino (Read 1 time) previous topic - next topic

heckmic

Jul 06, 2012, 05:00 pm Last Edit: Jul 06, 2012, 05:19 pm by heckmic Reason: 1
My Problem is that my LM 35 DZ is not working right. Serial Monitor:

Quote

3.42
11.23
38.09
24.90
0.00
115.72
118.65
33.20
13.67
43.95
25.39
27.83
16.60
100.10
112.79


example code
Quote
float temp;
int tempPin = 5;

void setup()
{
 Serial.begin(9600);
}

void loop()
{
 temp = analogRead(tempPin);
 temp = temp * 0.48828125;
 Serial.println(temp);
 delay(1000);
}


I've connected it like described on the data sheet. Flat surface on top. Left = VCC (5V) center = Data (A5), Right = GND
I've tested 5 of them with the same result.

What is wrong?


Krodal

Did you connect it to digital input 5, while you are reading analog input A5 ?

It looks like if the input A5 is not connected.

heckmic

Sorry, i connected it do A5. I've corrected it on top.


heckmic

I know this link. But it dont helped me...

Go Up