wwwwww

Dependencies:   USBDevice mbed

Files at this revision

API Documentation at this revision

Comitter:
12F2045K
Date:
Thu Nov 27 04:30:11 2014 +0000
Commit message:
okunochan

Changed in this revision

LED.cpp Show annotated file Show diff for this revision Revisions of this file
USBDevice.lib 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 b41ae5abc1f1 LED.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LED.cpp	Thu Nov 27 04:30:11 2014 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+#include "USBSerial.h"
+
+DigitalIn sw(P0_1, PullUp);
+AnalogIn sensorleft(P0_23), sensorcenter(P0_14),sensorright(P0_12),sensorlift1(P0_22),sensorlift2(P0_21);
+
+USBSerial vcom;
+
+int main(){
+        float hoge,pool,fink,coen,ronin;
+        
+        while(1){
+        hoge = sensorleft.read();
+        pool = sensorcenter.read();
+        fink = sensorright.read();
+        coen = sensorlift1.read();
+        ronin = sensorlift2.read();
+        
+        if(sw==0){
+            vcom.printf("\33[%d;%dH",0,0);
+            vcom.printf("sensorleft = %7.6f\n\r",hoge);
+            vcom.printf("sensorcenter = %7.6f\n\r",pool);
+            vcom.printf("sensorright = %7.6f\n\r",fink);
+            vcom.printf("sensorlift1 = %7.6f\n\r",coen);
+            vcom.printf("sensorlift2 = %7.6f\n\r",ronin);
+            }
+            
+        }
+}
\ No newline at end of file
diff -r 000000000000 -r b41ae5abc1f1 USBDevice.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/USBDevice.lib	Thu Nov 27 04:30:11 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/USBDevice/#37f14e05bfd7
diff -r 000000000000 -r b41ae5abc1f1 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 27 04:30:11 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file