アナログ入力

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
hasimo
Date:
Mon Jul 28 04:49:01 2014 +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 d86587ed9b1c TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Mon Jul 28 04:49:01 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#e4cb7ddee0d3
diff -r 000000000000 -r d86587ed9b1c main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jul 28 04:49:01 2014 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+#include "TextLCD.h"
+
+TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7
+AnalogIn ain(p15);
+
+int main() {
+    float adc;
+    
+    while (1){
+        lcd.locate(0,0);
+        lcd.printf("%8.3f \n", ain.read());
+        wait(0.05);                 // 20Hz update rate
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r d86587ed9b1c mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jul 28 04:49:01 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file