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: MPU6050 brushlessController_TB6612FNG ledControl2 mbed
Revision 7:b65164847018, committed 2015-08-05
- Comitter:
- BaserK
- Date:
- Wed Aug 05 12:49:18 2015 +0000
- Parent:
- 6:af164f09f963
- Commit message:
- i2c object is not extern anymore
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 |
--- a/MPU6050.lib Wed Jul 22 14:03:32 2015 +0000 +++ b/MPU6050.lib Wed Aug 05 12:49:18 2015 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/BaserK/code/MPU6050/#a173ad187e67 +https://developer.mbed.org/users/BaserK/code/MPU6050/#5bff0edcdff8
--- a/main.cpp Wed Jul 22 14:03:32 2015 +0000
+++ b/main.cpp Wed Aug 05 12:49:18 2015 +0000
@@ -74,7 +74,6 @@
int main()
{
pc.baud(9600); // baud rate: 9600
- i2c.frequency(400000); // fast i2c: 400 kHz
mpu6050.whoAmI(); // Communication test: WHO_AM_I register reading
mpu6050.calibrate(accelBias,gyroBias); // Calibrate MPU6050 and load biases into bias registers
pc.printf("Calibration is completed. \r\n");
@@ -85,8 +84,8 @@
gimbal.attach(&gimbalPID, 0.005); // Same period with gimbalPID (important)
while(1)
{
- /* pc.printf("%.1f,%.1f\r\n",rollAngle,pitchAngle);
- wait_ms(40);*/
+ pc.printf("%.1f,%.1f\r\n",rollAngle,pitchAngle);
+ wait_ms(40);
}
}