アナログ入力

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
--- /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
--- /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
--- /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