firstly, i watched almost all videos about using lm35 but they all youtuber used arduino uno with m35 and im confused my temperature sensor read the temperature aproximately 48 celcius but at ambient temperature was 24 celcius (sorry for languague)
Hi, welcome to the forum.
Post the code you're using, and a connection diagram.
Leo..
well I have the same exact issue
below my code
const int pin0 = A0;
const int pin1 = A1;
const float aref = 1.1;
void readLM35(int analogpin) {
 Serial.print("*********** pin");
Serial.print(analogpin);
int value = analogRead(analogpin); // read the value from the sensor
 float millivolts = (value / 1024.0) * 5000;
 float celsius = millivolts / 10;
Serial.print("Â celsius = ");
 Serial.println(celsius);
}
void setup()
{
 Serial.begin(9600);
Â
}
void loop()
{
 readLM35(pin0);
  readLM35(pin1);
 delay(1000);
}
and the attached is my connection diagram.
**also note when upload the same script with the same diagram in my Arduino Leonardo I get a correct measures from the sensors
Not familiar with the Leonardo or the Due.
But I see that default Aref on the Due is 3.3volt, and 5volt on the Leonardo.
So you will get different results.
const float aref = 1.1; Where are you using that.
float millivolts = (value / 1024.0) * 5000; That assumes Aref is 5volt.
Leo..
so I have to divide on 3300 instead of 5000?