Hey folk, in this blog we will discussed about interfacing LM35 temperature sensor with Arduino UNO.

Introduction about LM35 temperature sensor:

LM35 is a precession Integrated circuit Temperature sensor, whose output voltage varies, based on the temperature around it. It is a small and low-cost IC that can be used to measure temperature anywhere between -55°C to 150°C.


It can easily be interfacing LM35 with any Microcontroller that has ADC function or any development platform like Arduino. LM35 Temperature Sensor basically works on the principle of change in resistance with temperature.

LM35 temperature sensor has three pins as given below:

1. Vcc: 5V (Power Supply )
2. Output pin: for taking the sensor reading
3. GND: ground

The requirement for the project:

Hardware components:

1. LM35 temperature sensor

2. Arduino UNO

3. Jumper wires

Software used:

Arduino IDE


  • Connect the V pin of the sensor to 5V Arduino.
  • GND pin of the sensor with GND of Arduino.
  • Interface OUT pin of the sensor with A2 pin of Arduino.
Interfacing LM35 with Arduino
Interfacing LM35 with Arduino

Steps of working the project:

Interfacing LM35 with Arduino

STEP 1: Connect the arduino to the USB port of the computer.

STEP 2: Open two Arduino IDE window and Select Arduino UNO as Board and select the appropriate COM27 port.

Board: Tools > Board > Arduino UNO.

STEP 3: Port: Tools > Port in Arduino(COM 27 port).

STEP 4: Compile and upload the above program to your Arduino uno board via Arduino IDE. Readings from the sensor will be obtained in the serial monitor.


void setup()


  // initialize serial communications at 9600 bps:


int analog = A2;

float temp = 0;


void loop()


int  analog = analogRead (A2);

 float temp = analog*0.3222;




The Output Screenshot of Serial Monitor:

Interfacing LM35 with Arduino

Here, we get the output that the temperature which is sensed by the LM35 temperature sensor and so that we get the output of room temperature as 20.62-degree Celcius. So as we move the sensor at different temperatures then we get output according to that different temperature.

Read and share my another blog —

Arduino Flame Sensor Interfacing to Build Fire Alarm System

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.