Friday, November 7, 2014

Temperature Monitoring using Arduino Uno

In this project we are going to monitor room Temperature with Arduino Uno board. Connect the temperature sensor LM35 as shown in the figure. Output of the LM35 is connected to the Analog port A0, itreads the temperature variation and it displays the digital data on to the LCD screen. Run the code given below.

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("Temp monitoring");
}

void loop() {
  float temp;
  temp=analogRead(0);
  lcd.setCursor(0, 1);
  lcd.print("Temperature=");
  lcd.print(temp);
  delay(100);
}