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.
main.cpp
00001 00002 #include "mbed.h" 00003 #include "math.h" 00004 00005 #include "HMC5883L.h" 00006 #include "ADXL345_I2C.h" 00007 #include "L3G4200D.h" 00008 #include "BMP085.h" 00009 #include "HK10DOF.h" 00010 00011 //#include "PwmIn.h" 00012 00013 00014 PwmOut rled(LED_RED); 00015 PwmOut gled(LED_GREEN); 00016 PwmOut bled(LED_BLUE); 00017 00018 HK10DOF imu(PTE0,PTE1); 00019 float ypr[3]; 00020 float values[9]; 00021 00022 int main() 00023 { 00024 rled=1; 00025 gled=1; 00026 00027 imu.pc.printf("Ceci est un Test\r\n"); 00028 imu.init(true); 00029 imu.pc.printf("Test passe\r\n"); 00030 float alt=0; 00031 00032 00033 while(1) { 00034 //imu.getValues(values); 00035 imu.getYawPitchRoll(ypr); 00036 imu.pc.printf("YAW: %03.0f PITCH: %03.0f ROLL: %03.0f \n\r",ypr[0],ypr[1],ypr[2]); 00037 alt=imu.getBaroAlt(); 00038 //imu.pc.printf("ALT : %03.0f",alt); 00039 00040 //imu.pc.printf("ACC: %04.0f %04.0f %04.0f GYR: %04.0f %04.0f %04.0f MAG: %04.0f %04.0f %04.0f \n\r",values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8] ); 00041 wait_ms(1); 00042 bled=!bled; 00043 00044 00045 00046 } 00047 00048 00049 00050 00051 00052 }
Generated on Tue Jul 26 2022 07:09:52 by
1.7.2