0% found this document useful (0 votes)
19 views

EX12

The document describes an experiment to monitor temperature using an Arduino, LCD display, ultrasonic sensor, and LM35 temperature sensor. It lists the hardware components needed, provides diagrams of how to connect the ultrasonic sensor and temperature sensor to the Arduino, and includes code to display sensor readings on the LCD screen. The code measures distance using the ultrasonic sensor and temperature using the LM35 sensor, then prints the readings and a welcome message to the LCD.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

EX12

The document describes an experiment to monitor temperature using an Arduino, LCD display, ultrasonic sensor, and LM35 temperature sensor. It lists the hardware components needed, provides diagrams of how to connect the ultrasonic sensor and temperature sensor to the Arduino, and includes code to display sensor readings on the LCD screen. The code measures distance using the ultrasonic sensor and temperature using the LM35 sensor, then prints the readings and a welcome message to the LCD.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

EX.NO.

12
MONITORING THE TEMPERATURE SENSOR

AIM:

HARDWARE REQUIREMENTS:

S.NO COMPONENTS QUANTITY


1 Arduino Uno R3 1
2 USB Cable A/B 1
3 LCD display 1
4 I2c module 1
5 Jumper cables(M to F) 4
6 Ultrasonic sensor 1
7 LM35 temperature sensor 1

PROCEDURE:

1.Connect LCD display to arduino kit by following steps:


(i).connect I2c module VCC to 5v in arduino
(ii).Connect I2C module ground pin to Arduino Ground
(iii)Connect SDA and SCL to A4 and A5 in arduino
2.Connect Ultrasonic sensor to arduino by following
steps: (i)connect TRIG to pin 2 of arduino
(ii) Connect ECHO to pin 3 of arduino.
3.Connect LM35 temperature sensor with arduino kit by following steps:

 Connect positive(+) pin(1) to 5v of arduino


 connect pin 2 of LM35 to A0 of
Arduino
 connect pin 3 to ground of arduino

4.Upload the header files <wire.h> and <liquid crystaldisplay.h>


CIRCUIT DIAGRAM FOR LM35 TO ARDUINO:

CIRCUIT DIAGRAM FOR ULTRA SONIC SENSOR WITH ARDUINO:


CODE:

#include<wire.h>
#incllude<LiquidCrystal_I2
C.h> Liquid Crystal_I2C
lcd(0*3F,16,2); Const int
trigPin=2;
Const int
echoPin=3;
long duration ;
int dist;
Void setup()
{
Serial.begin(9600);
pinMode(trigPin,OUTPUT);
pinMode(echoPin,INPUT);
Serial.println(“Ultrasonic working
Principle”); lcd.begin();
lcd.backlight();
lcd.clear();
lcd.setcursor(4,0);
lcd.print(WELCO
ME”);
lcd.setcursor(0,1);
lcd.print(“LET US SEE OUTPUT”);
delay(1000);
}
Void loop()
{
digitalWrite(trigPin,LOW);
}

RESULT:

You might also like