hye, i have a problem with LM35.. my sensor just detect only a value which is 31*C no matter how hot a day is and how cold a day is..
here i include my coding
float tempC;
int tempPin = 1;
int val;
float time;
//write setup fn
void setup()
{
Serial.begin (9600);
}
//loop
void loop()
{
val = analogRead(tempPin);
float tempC = val*0.0303030303;
if (tempC>30)
{
Serial.print("Time: ");
time = millis();
Serial.println(time);
Serial.print("TEMPERATURE= ");
Serial.print(tempC);
Serial.print("*C");
Serial.println();
delay(3000);
}
}