100% found this document useful (1 vote)
4 views3 pages

Arduino Temperature

arduino temperature sensor with LCD
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
4 views3 pages

Arduino Temperature

arduino temperature sensor with LCD
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ARDUINO PROJECT

SIMPLE ROOM TEMPERATURE READOUT

A simple program and hardware to read room temperature from LM35


(Precision Centigrade Temperature Sensors) and display the temperature
in degree centigrade on 16X2 LCD. The hardware can be easily
assembled on Breadboard. Some instructions are redundant and are
added in just to show their usage. This program can be easily expended
for more complex usage.

//Program to read analog temperature from LM35 and show on LCD

//LiquidCrystal(rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7)

//LCD 1 Gnd, 2 VCC, 3 intensity, 4 RS, 5 R/W, 6 enable, 11 D0, 12 D1, 13 D2, 14 D3.

// LiquidCrystal display with:

// rs on pin 10

// rw on pin 9

// enable on pin 8

// d0, d1, d2, d3 on pins 5, 4, 3, 2

#include <LiquidCrystal.h>

LiquidCrystal lcd(10, 9, 8, 5, 4, 3, 2);

int refval = 0;

char* str1[] = {

"CHANNEL A", "CHANNEL B", "CHANNEL C"};

void setup()
{

//Initialise I/O ports. Not used

pinMode(12,OUTPUT);

pinMode(13,OUTPUT);

pinMode(11,OUTPUT);

pinMode(7,INPUT);

digitalWrite(12,LOW);

void loop()

refval = analogRead(0);

refval = refval/2;

[Link]();

[Link](str1[0]);

[Link](1,1);

[Link]("Temp");

[Link](" : ");

[Link](refval);

[Link](223,BYTE);

[Link]("C");

delay(100);

}
HARDWARE

You might also like