Introduction: LM35 Temperature Sensor Interfaced With Arduino Uno

#arduino #LM35

Step 1: Collect All the Stuff!

You would need:

1) Arduino Uno board or equivalent.

2) LM35 temperature sensor.

3) Bread board.

4) USB (as supported by the board)

5) Arduino IDE.

6) Connecting wires.

All the required components are avilable on amazon as well as at local market if you're willing to venture.

I've given some links for some of the components should you wish to check :)

Arduino Uno:


Arduino IDE:

Step 2: Connections.

LM35 is a three terminal IC and reads analog voltage.

Connections are made as shown in the picture. (pins are numbered 1,2,3 from right seeing through the flat side of the IC)

  • Connect 1 to 5 Volts supply.
  • Connect 3 to GND.
  • Connect 2 to analog pin A1 of Arduino Uno.
  • Connect the supply to the bread board as shown in picture 2.

Step 3: Code!

int val;

int tempPin=A1;

void setup() {

Serial.begin(9600); //pinMode(tempPin,OUTPUT); // put your setup code here, to run once: }

void loop() {


float cel=val/9.31;

float farh=(cel*9)/5+32;

Serial.print("TEMPERATURE in CELCIUS=");

Serial.print(cel); Serial.print("*C");



Serial.println("TEMPERATURE in FARHENHITE=");



delay(5000); Serial.println(); i

f (cel>25) { Serial.println("Its a hot day");


else {

Serial.println("Good day to be alive"); }




Step 4: Upload the Code

upload the code on your arduino. Open the Serial Monitor to see your circuit in work!