アナログ入力のテスト(温度センサ)

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
yueee_yt
Date:
Mon Dec 26 08:18:16 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Mon Dec 26 08:18:16 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Dec 26 08:18:16 2011 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+#include "TextLCD.h"
+
+TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7
+AnalogIn temp(p20);
+
+int main() {
+    lcd.cls();
+    lcd.printf("Temperature \n");
+    while (1) {
+        lcd.locate(0,1);
+        lcd.printf("%4.2f Deg",temp.read()*330.0);
+        wait(0.1f);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Dec 26 08:18:16 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/078e4b97a13e