potention test program

Dependencies:   C12832_lcd mbed

Files at this revision

API Documentation at this revision

Comitter:
khayakawa
Date:
Mon Sep 16 01:43:39 2013 +0000
Parent:
0:ea5527eaa968
Commit message:
potention meater test program;

Changed in this revision

C12832_lcd.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832_lcd.lib	Mon Sep 16 01:43:39 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/dreschpe/code/C12832_lcd/#468cdccff7af
--- a/main.cpp	Tue Feb 12 15:21:21 2013 +0000
+++ b/main.cpp	Mon Sep 16 01:43:39 2013 +0000
@@ -1,14 +1,18 @@
 #include "mbed.h"
- 
-AnalogIn ain(p19);
+#include "C12832_lcd.h"
+
+C12832_LCD lcd;
+AnalogIn ain1(p20);
+AnalogIn ain2(p19);
 DigitalOut led(LED1);
- 
+
 int main() {
+    lcd.cls();
     while (1){
-        if(ain > 0.3) {
-            led = 1;
-        } else {
-            led = 0;
-        }
+       lcd.locate(0,3);
+       lcd.printf("potention1 : %.2f\n", ain1.read());
+       lcd.locate(0,15);
+       lcd.printf("potention2 : %.2f\n", ain2.read()); 
+        wait(0.1);
     }
 }
\ No newline at end of file