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: mbed-dev
Fork of Adafruit9-DOf_AHRS_Regler_Discrete by
Revision 3:bd353b8184cc, committed 2018-09-20
- Comitter:
- rtlabor
- Date:
- Thu Sep 20 08:35:36 2018 +0000
- Parent:
- 2:9fd59c70ad78
- Commit message:
- VT1 domc original
;
Changed in this revision
| Source/Adafruit_L3GD20_U.cpp | Show annotated file Show diff for this revision Revisions of this file |
| Source/main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Source/Adafruit_L3GD20_U.cpp Thu Oct 19 11:52:10 2017 +0000
+++ b/Source/Adafruit_L3GD20_U.cpp Thu Sep 20 08:35:36 2018 +0000
@@ -80,8 +80,8 @@
for correct address and that the IC is properly connected */
uint8_t id = 0;
id = read8(GYRO_REGISTER_WHO_AM_I);
- Serial serial( USBTX, USBRX);
- serial.printf("WHOAMI Gyro %d \r\n", id);
+ Serial pc(USBTX, USBRX, 115200);
+ pc.printf("WHOAMI Gyro %d \r\n", id);
if ((id != L3GD20_ID) && (id != L3GD20H_ID))
{
return false;
--- a/Source/main.cpp Thu Oct 19 11:52:10 2017 +0000
+++ b/Source/main.cpp Thu Sep 20 08:35:36 2018 +0000
@@ -41,8 +41,8 @@
Adafruit_L3GD20_Unified gyro = Adafruit_L3GD20_Unified(30303);
//Debug/Communication with PC through
-Serial pc(PA_0, PA_1, 115200); //921600; 115200
-Serial serial1(USBTX, USBRX, 9600);
+Serial serial1(PA_0, PA_1, 115200); //921600; 115200
+Serial pc(USBTX, USBRX, 115200);
// Magnetometer correction
// mounted in gimbal
@@ -131,6 +131,7 @@
while(1);
}
+ pc.printf("Accel Initialized\r\n");
if(!mag.begin())
{
@@ -141,6 +142,7 @@
while(1);
}
+ pc.printf("Mag Initialized\r\n");
gyroRange_t rng = GYRO_RANGE_2000DPS; //set gyro range to +/-2000dps
@@ -154,7 +156,7 @@
while(1);
}
-
+pc.printf("Gyro Initialized\r\n");
}
/**************************************************************************
@@ -242,7 +244,7 @@
eMaxNeg = 0;
serial1.printf("Error reseted");
}
- //serial1.printf("Roll: %f Grad \r\n",filter.getRoll());
+ pc.printf("Roll: %f Grad \r\n",filter.getRoll());
}
//Stop timer
