Just a simple sample of TextLCD and LM35 temperature sensor

Dependencies:   mbed

Committer:
nxpfan
Date:
Thu Aug 12 14:41:43 2010 +0000
Revision:
0:b319bd1b3313

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nxpfan 0:b319bd1b3313 1 // A simple sample to use TextLCD and LM35 temeperature sensor
nxpfan 0:b319bd1b3313 2
nxpfan 0:b319bd1b3313 3 #include "mbed.h"
nxpfan 0:b319bd1b3313 4 #include "TextLCD.h"
nxpfan 0:b319bd1b3313 5
nxpfan 0:b319bd1b3313 6 TextLCD lcd(p24, p25, p26, p27, p28, p29); // rs, e, d0-d3
nxpfan 0:b319bd1b3313 7 AnalogIn a_in(p20);
nxpfan 0:b319bd1b3313 8
nxpfan 0:b319bd1b3313 9 int main() {
nxpfan 0:b319bd1b3313 10 lcd.printf("Hello World!\n");
nxpfan 0:b319bd1b3313 11
nxpfan 0:b319bd1b3313 12 while (1) {
nxpfan 0:b319bd1b3313 13 lcd.locate( 0, 1 );
nxpfan 0:b319bd1b3313 14 lcd.printf( "%f", a_in * 3.3 * 100 );
nxpfan 0:b319bd1b3313 15 wait( 1.0 );
nxpfan 0:b319bd1b3313 16 }
nxpfan 0:b319bd1b3313 17 }