Instructables

Measure the temperature and show it on a LCD display

Picture of Measure the temperature and show it on a LCD display
Temp-LM35_Steckplatine.jpg
I made a little arduino sketch, that displays the temperature on a LCD display measured by a LM35. I used a 16X1 LCD Display. The Code is quite easy and can send the value via serial connection, too.

What you need:

Arduino Board
LCD Display
LM35 temperature sensor
resistor (for backlight)
 
Remove these adsRemove these ads by Signing Up

Step 1:

Picture of
Here’s my source coude (based on the example LCD code on arduino.cc):



#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define LCD_CLEAR 0b00000001 // 0×01
float temp;
int tempPin = 0;

void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
//lcd.print(“”);
}

void loop() {
temp = analogRead(tempPin);
temp = temp * 0.48828125;
lcd.setCursor(0, 0);
lcd.print(temp);
lcd.print(” C”);
delay(1000);
lcd.clear();

Serial.println(temp);

}
Qtronik made it!9 months ago

Nice! I personally coupled this type of LCD and I found that is divided in 2 rows! Second row started a digit 9...

The best librarie for using different rows and column LCD is here:

https://code.google.com/p/liquidcrystal440/downloa...

My personal Arduino projects will soon be published... Automatica Aqua

LiquidCrystal440 GoogleCode.PNG
EET19821 year ago
Hi. Very cool project. I will be making this soon. May I ask why the 5v is pulled to the outer rail if nothing connects to the rail?
very nice, are you going to use this for a larger project?
knuppel (author)  amandaghassaei2 years ago
i did something like this: http://www.opensketches.org/temperatur-messen-mit-einem-lm35-und-anzeige-auf-einem-lcd-display-processing-anzeige-mysql/
knuppel (author)  amandaghassaei2 years ago
In used it to display the temperature on the computer (via processing) and then, when the computer is online it sends the temperature to a webserver,and the temperature can be seen in the internet.