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_tmp mbed
main.cpp
00001 #include "mbed.h" 00002 #include "MPU6050.h" 00003 #include "GurvIMU.h" 00004 00005 00006 //#define PI 3.1415926535897932384626433832795 00007 GurvIMU imu; 00008 00009 DigitalOut myled(LED1); 00010 Serial pc(USBTX, USBRX); 00011 float euler[3]; 00012 float av[4]; 00013 00014 int main() { 00015 pc.baud(921600);//init la liaison série a la vitesse max 00016 pc.printf("Init\r\n"); 00017 imu.init(); 00018 while(1) { 00019 //imu.getYawPitchRollRad(euler); 00020 //pc.printf("Yaw : %f , Pitch : %f , Roll : %f \r\n" , euler[0], euler[1], euler[2]); 00021 imu.getVerticalAcceleration(av); 00022 pc.printf("%f\r\n",av[3]); 00023 wait_ms(10); 00024 } 00025 }
Generated on Sat Jul 16 2022 08:19:38 by
1.7.2