NXP fan (in Japan)
/
DKM_TextLCD_LM35_2
Just a simple sample of TextLCD and LM35 temperature sensor (version2)
Revision 0:87b4eb4bb312, committed 2010-08-12
- Comitter:
- nxpfan
- Date:
- Thu Aug 12 14:42:06 2010 +0000
- Commit message:
Changed in this revision
diff -r 000000000000 -r 87b4eb4bb312 TextLCD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Thu Aug 12 14:42:06 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
diff -r 000000000000 -r 87b4eb4bb312 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Aug 12 14:42:06 2010 +0000 @@ -0,0 +1,25 @@ +// A simple sample to use TextLCD and LM35 temeperature sensor + +#include "mbed.h" +#include "TextLCD.h" + +AnalogIn ain(p20); +TextLCD lcd(p24, p25, p26, p27, p28, p29); // rs, e, d0-d3 + +int main() { + float ondo; + lcd.printf("Ondokei\n"); + + while (1) { + ondo = 0; + + for ( int i = 0; i < 100; i++ ) { + ondo += ain; + wait(0.01); + } + + printf( "%f\r\n", ondo * 3.3 ); + lcd.locate( 3, 1 ); + lcd.printf( "ondo =%5.1f%cC", ondo * 3.3, 0xDF ); + } +}
diff -r 000000000000 -r 87b4eb4bb312 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Aug 12 14:42:06 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da