Temperature Monitoring

Description

     Guys, In this project we are going to monitor the temperature on an LCD screen using temperature sensor. Okey,let's make it.
      
Components Required

 1. Arduino UNO  * 1
 2.  Temparature Sensor(TMP36)   * 1
 3. LCD(16*2) * 1
 4. Resister(220 Ohm) * 1
 5. Jumper Wires * 1

Circuit Diagram




Program

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

const int tmp = A0;
const int p = 8;

void setup() 
{
  lcd.begin(16, 2);
  Serial.begin(9600);
  pinMode(p, OUTPUT);
  
}

void loop() 
{
  digitalWrite(p,LOW);
  int Temp = analogRead(tmp);
  float volts = (Temp / 965.0) * 5;
  float c = (volts - .5) * 100;
  float f = (c * 9 / 5 + 32);
  Serial.println(f);
  lcd.setCursor(5, 0);
  lcd.print(f);
  delay(3000);
  }