Q.No.9 - WAP for arduino board to meansure temperature and display it on lcd.

Sol.-

#include <LiquidCrystal.h>

LiquidCrystal lcd(2,3,4,5,6,7);
void setup()
{
  lcd.begin(16,2);
}
void loop()
{
  int reading=analogRead(A0);
  float mil=(reading/1024.0)*5000;
  float celsius=mil/10-49;
  lcd.print("Temperature is");
  lcd.print(celsius);
  delay(800);
  lcd.clear();
  
}

Pins connections:- For LCD LED- connected to ground having resistor 1kilo ohm. LED- connnected to ground. DB7- to Digital pin 7 DB6- to pin no. 6 DB5- to pin no. 5 DB4- to pin no. 4 E(Enable)- to pin no. 3 R/W (read/write)- ground connection RS - pin no. 2 V0 - ground with resistor 330 ohm VCC- power 5v Gnd- ground. For TMP36 Sensor: power 5v , analog A0 for reading and one ground.

OUTPUT: