I have been working on my project to detect temperature values using LM35 temperature sensor using an Arduino UNO. I have used this sensor serval times with no issues. But recently none of my LM35 are functioning properly with all codes I have tried. I am baffled with what has happened with them. My connections are also correct. I have tried to re-wire them but everything is in vain. Can anyone please help me.
And for another one of my temperature sensor it gives about 40 to 55 degree Celsius at room temperature of 26 C.
The connections are VCC to 5V, GND to GND and Signal to A0 pin of Arduino.
Codes I have tried