記念祭のドローンのプログラム

Dependencies:   mbed MPU6050 nRF24L01P FastPWM

Files at this revision

API Documentation at this revision

Comitter:
ritarosakai
Date:
Wed Mar 04 07:05:30 2020 +0000
Parent:
3:af610833ab4c
Commit message:
Publish

Changed in this revision

MPU6050.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
diff -r af610833ab4c -r 2e2f44da93b3 MPU6050.lib
--- a/MPU6050.lib	Sun Jan 07 08:28:02 2018 +0000
+++ b/MPU6050.lib	Wed Mar 04 07:05:30 2020 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/ritarosakai/code/MPU6050/#8c37e640d958
+https://os.mbed.com/users/ritarosakai/code/MPU6050/#002d3ac85242
diff -r af610833ab4c -r 2e2f44da93b3 main.cpp
--- a/main.cpp	Sun Jan 07 08:28:02 2018 +0000
+++ b/main.cpp	Wed Mar 04 07:05:30 2020 +0000
@@ -204,7 +204,7 @@
     dy_old=dy;
     kx_old=kx;
     ky_old=ky;
-    pc.printf("%.2f,%.2f\r\n",kx,ky);
+    //pc.printf("%.2f,%.2f\r\n",kx,ky);
     txdata[0]=outx*100+128;//制御データーを送信
     txdata[1]=outy*100+128;
     txdata[2]=bat*20;
@@ -289,8 +289,9 @@
     //gy_offset=-0.71;
     pc.printf("gyro offset %.2f %.2f %.2f\r\n",gx_offset,gy_offset,gz_offset);
     wait(2);
-    sampler.attach_us(&sample,samp*1000000);//ループ開始
+    //sampler.attach_us(&sample,samp*1000000);//ループ開始
     while(1) {
-        wait(0.01);
+        sample();
+        wait_us(3500);
     }
 }
diff -r af610833ab4c -r 2e2f44da93b3 mbed.bld
--- a/mbed.bld	Sun Jan 07 08:28:02 2018 +0000
+++ b/mbed.bld	Wed Mar 04 07:05:30 2020 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/7130f322cb7e
\ No newline at end of file
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file