You are on page 1of 1

#include <LiquidCrystal.

h>
LiquidCrystal lcd(2,3,8,7,6,5);
int lm35=A0;
int val=0;
void setup() {
Serial.begin(9600);
lcd.begin(16,2);
lcd.noBlink();
lcd.noCursor();
pinMode(lm35,INPUT);
lcd.setCursor(0,0);
lcd.print("MATLAB BASED");
lcd.setCursor(0,1);
lcd.print(" DA SYSTEM ");
delay(5000);
lcd.clear();
}
void loop() {
lcd.setCursor(0,0);
int temp_val=analogRead(lm35);
temp_val=temp_val*0.48828125;
lcd.print("Temperature=");
lcd.print(temp_val);
lcd.print("*C
");
lcd.setCursor(0,1);
Serial.print(temp_val);
delay(1000);
}