単輪試験機用ジャイロセンサテスト

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
manimani3712
Date:
Tue Jan 12 07:51:55 2016 +0000
Commit message:
???????????????_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
diff -r 000000000000 -r d26bfc306bb4 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jan 12 07:51:55 2016 +0000
@@ -0,0 +1,21 @@
+//Gyro test01
+// Akidukidensi AE-GYRO-SMD
+#include "mbed.h"
+
+
+#define ON 1
+#define OFF 0
+
+AnalogIn gyro1_adc(PTB0);//ジャイロ1
+AnalogIn gyro2_adc(PTB1);//ジャイロ2
+Serial pc(USBTX, USBRX);
+
+
+int main() {
+  float gy1_data;  
+  pc.printf("Gyrotest\n");
+  while(1){   
+      gy1_data=gyro1_adc.read();//ジャイロ1データの読み込み
+      pc.printf("Gyro1:%2.5f\n",gy1_data);
+  }//while    
+}//main      
\ No newline at end of file
diff -r 000000000000 -r d26bfc306bb4 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jan 12 07:51:55 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c
\ No newline at end of file