単輪試験機用測距センサテスト

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
manimani3712
Date:
Tue Jan 12 07:39:24 2016 +0000
Commit message:
???????????GP2Y0A21YK_test

Changed in this revision

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/main.cpp	Tue Jan 12 07:39:24 2016 +0000
@@ -0,0 +1,16 @@
+//sensor_test
+
+#include "mbed.h"
+
+AnalogIn sensor(PTB2);
+Serial pc(USBTX, USBRX);
+
+
+int main() {
+  float sensor_data;  
+  pc.printf("sensortest\n");
+  while(1){   
+      sensor_data=sensor.read();//ジャイロ1データの読み込み
+      pc.printf("sensor:%2.5f\n",sensor_data);
+  }//while    
+}//main      
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jan 12 07:39:24 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c
\ No newline at end of file