Introduction: Measure the Temperature and Show It on a LCD Display

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)

Step 1:

Here’s my source coude (based on the example LCD code on

#include <LiquidCrystal.h>

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

void setup() {
lcd.begin(16, 2);

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