Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MPU9250_SPI mbed
Fork of MPU9250_AHRS by
Diff: main.cpp
- Revision:
- 9:e700b2d586d6
- Parent:
- 8:03f9b5289083
- Child:
- 10:28fa811afbfb
--- a/main.cpp Fri Jun 17 05:46:08 2016 +0000
+++ b/main.cpp Fri Jun 17 06:07:57 2016 +0000
@@ -60,7 +60,7 @@
//myled = 1;
- wait_us(1);
+ //wait_us(1);
for(int i=0; i<2; i++) {
@@ -68,8 +68,19 @@
imu[1]->deselect();
imu[i]->select();
+ imu[i]->read_acc();
+ imu[i]->read_rot();
+
+ printf("%10.3f,%10.3f,%10.3f %10.3f,%10.3f,%10.3f ",
+ imu[i]->gyroscope_data[0],
+ imu[i]->gyroscope_data[1],
+ imu[i]->gyroscope_data[2],
+ imu[i]->accelerometer_data[0],
+ imu[i]->accelerometer_data[1],
+ imu[i]->accelerometer_data[2]
+ );
+ /*
imu[i]->read_all();
-
printf("%10.3f,%10.3f,%10.3f,%10.3f,%10.3f,%10.3f,%10.3f,%10.3f,%10.3f,%10.3f ",
imu[i]->Temperature,
imu[i]->gyroscope_data[0],
@@ -81,7 +92,7 @@
imu[i]->Magnetometer[0],
imu[i]->Magnetometer[1],
imu[i]->Magnetometer[2]
- );
+ );*/
//myled = 0;
//wait(0.5);
}
