Introduction




Name of Experiment: Interfacing of temperature sensor & LCD

Exp No: 5

Background: Student should have a basic knowledge of Arduino software & Arduino programming.

Summary: After going through this experiment, student should be able to display the temperature on the LCD display of Arduino Software.

Learning Objective: To understand the interfacing of temperature sensor & LCD with Intel Galileo Gen1.

Target

Target Platform: This experiment is tested on Intel Galileo Board Gen1 using Arduino software.

Procedure

SourceCode

Source Code:

#include <LiquidCrystal.h>
//initializes/defines the output pin of the LM35 temperature sensor
int outputpin= 0;
//this sets the ground pin to LOW and the input voltage pin to high
// BS E D4 D5 D6 D7
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
lcd.begin(16,2);
}
//main loop
void loop()
{
int rawvoltage= analogRead(outputpin);
float millivolts= (rawvoltage/1024.0) * 5000;
float celsius= millivolts/10;
lcd.setCursor(0, 0);
lcd.print(" BY IGDTUW:ESENS,");
lcd.setCursor(0, 1);
lcd.print(celsius);
lcd.print("C");
delay(1000);
}
}

Snapshots



Observation

Observation: It is observed that the room temperature of Embedded Systems Lab is displayed on the LCD in degree Celsius.

Video Link

Download

Right Click Here And Select Save Target For Entire Download:

Temperature Sensor & LCD