Quantcast
Channel: Sensors - Arduino Forum
Viewing all articles
Browse latest Browse all 1078

LM35DZ sensor gives 0 value

$
0
0

Hello. I am new to using the LM35DZ sensor and I just unpacked it. I believe I connected the cables correctly. But for some reason the sensor starts to give a value in a certain range and then slowly drops to 0. I have the same problem with 2 LM35DZ sensors that I just unpacked.

Code:

#define LM35_Pin A0


void setup() {
  Serial.begin(9600);
  pinMode(LM35_Pin, INPUT);
}
void loop() {
  Serial.print("Value: ");
  Serial.println(analogRead(LM35_Pin));
  delay(1000);
}

Output (9600)

Value: 11
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 1
Value: 3
Value: 5
Value: 5
Value: 5
Value: 8
Value: 10
Value: 11
Value: 11
Value: 10
Value: 12
Value: 12
Value: 10
Value: 8
Value: 6
Value: 4
Value: 3
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 16
Value: 47
Value: 73
Value: 77
Value: 75
Value: 75
Value: 73
Value: 70
Value: 68
Value: 64
Value: 64
Value: 60
Value: 48
Value: 26
Value: 5
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
Value: 0
...


Set-up

What am i doing wrong?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1078

Trending Articles