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.
Dependents: minimu_data_capture minimu_data_capture
Fork of DCM_AHRS by
Revision 2:85214374e094, committed 2015-01-20
- Comitter:
- ogarai
- Date:
- Tue Jan 20 02:04:07 2015 +0000
- Parent:
- 1:3272ece36ce1
- Commit message:
- First Commit
Changed in this revision
--- a/L3G4200D.cpp Mon Apr 23 14:31:08 2012 +0000
+++ b/L3G4200D.cpp Tue Jan 20 02:04:07 2015 +0000
@@ -24,7 +24,7 @@
#include "mbed.h"
-L3G4200D::L3G4200D( PinName sda = p9, PinName scl = p10 ) : i2c( sda, scl ) {
+L3G4200D::L3G4200D( PinName sda = PTE0, PinName scl = PTE1 ) : i2c( sda, scl ) {
writeReg( L3G4200D_CTRL_REG1, 0x0f );
}
--- a/LSM303.cpp Mon Apr 23 14:31:08 2012 +0000
+++ b/LSM303.cpp Tue Jan 20 02:04:07 2015 +0000
@@ -2,7 +2,7 @@
#include "LSM303.h"
#include <math.h>
-LSM303::LSM303( PinName sda = p9, PinName scl = p10 ) : i2c( sda, scl ) {
+LSM303::LSM303( PinName sda = PTE0, PinName scl = PTE1 ) : i2c( sda, scl ) {
// These are just some values for a particular unit; it is recommended that
// a calibration be done for your particular unit.
m_max.x = +540;
--- a/minimu9.cpp Mon Apr 23 14:31:08 2012 +0000
+++ b/minimu9.cpp Tue Jan 20 02:04:07 2015 +0000
@@ -9,8 +9,8 @@
Serial pc(USBTX, USBRX);
t.start();
initialize_values();
- gyro = new L3G4200D( p9, p10 );
- compass = new LSM303( p9, p10 );
+ gyro = new L3G4200D( PTE0, PTE1 );
+ compass = new LSM303( PTE0, PTE1 );
// Initiate the accel
compass->writeAccReg(LSM303_CTRL_REG1_A, 0x27); // normal power mode, all axes enabled, 50 Hz
@@ -335,17 +335,17 @@
void minimu9::print_data(void) {
#if DEBUG_MODE == 1
- Serial pc(USBTX, USBRX);
- pc.printf("!");
+// Serial pc(USBTX, USBRX);
+ printf("!");
#if PRINT_EULER == 1
- pc.printf("ANG:%.2f,%.2f,%.2f", ToDeg(roll), ToDeg(pitch), ToDeg(yaw));
+ printf("ANG:%.2f,%.2f,%.2f", ToDeg(roll), ToDeg(pitch), ToDeg(yaw));
#endif
#if PRINT_ANALOGS==1
- pc.printf(",AN:%d,%d,%d,%d,%d,%d", AN[0], AN[1], AN[2], AN[3], AN[4], AN[5] );
- pc.printf(",%.2f,%.2f,%.2f", c_magnetom_x, c_magnetom_y, c_magnetom_z );
+ printf(",AN:%d,%d,%d,%d,%d,%d", AN[0], AN[1], AN[2], AN[3], AN[4], AN[5] );
+ printf(",%.2f,%.2f,%.2f", c_magnetom_x, c_magnetom_y, c_magnetom_z );
#endif
- pc.printf("\n");
+ printf("\n");
#endif
}
