エレキジャック Web版 mbedで初めてのマイコン開発 LCDを極める!<3/5> 温度センサ(LM35)を使ってLCDに温度を表示するプログラムです。 http://www.eleki-jack.com/arm/2010/11/mbed-lcd-2.html

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
sunifu
Date:
Wed Mar 02 13:27:07 2011 +0000
Commit message:

Changed in this revision

TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 8c1e9715121a TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Wed Mar 02 13:27:07 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
diff -r 000000000000 -r 8c1e9715121a main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Mar 02 13:27:07 2011 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "TextLCD.h"
+
+TextLCD lcd(p24, p26, p27, p28, p29, p30);
+AnalogIn temp_in(p20);
+
+int main() {
+    float r_temp, temp;
+    while(1){
+        temp = temp_in ;    
+        r_temp = temp *3.3 * 100.0  ;
+        //r_temp =  temp_in * 55.0  ; 
+        lcd.cls();
+        lcd.locate(0,0);
+        lcd.printf("RoomTemp %5.2f",r_temp);
+        lcd.locate(14,0);
+        lcd.putc(0xDf);
+        lcd.putc(0x43);
+        
+        lcd.locate(0,1);
+        lcd.printf("%5.3f %5.3f[V]",temp, temp*3.3);
+        wait(5);
+    }
+}
diff -r 000000000000 -r 8c1e9715121a mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Mar 02 13:27:07 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912