航空研究会 / Mbed 2 deprecated MPU_check

Dependencies:   mbed MPU6050_2

Committer:
taknokolat
Date:
Wed Feb 06 10:54:28 2019 +0000
Revision:
0:eae101ae93c0
a;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
taknokolat 0:eae101ae93c0 1 //This is a sample code to get pitch, roll, yaw in degree from MPU9250;
taknokolat 0:eae101ae93c0 2 /*
taknokolat 0:eae101ae93c0 3 #include "mbed.h"
taknokolat 0:eae101ae93c0 4 #include "MPU9250.h"
taknokolat 0:eae101ae93c0 5
taknokolat 0:eae101ae93c0 6 Serial pc(SERIAL_TX,SERIAL_RX);
taknokolat 0:eae101ae93c0 7 MPU9250 mpu9250(pinSDA,pinSCL,&pc);
taknokolat 0:eae101ae93c0 8
taknokolat 0:eae101ae93c0 9 int main(void){
taknokolat 0:eae101ae93c0 10 float degrees[3];
taknokolat 0:eae101ae93c0 11
taknokolat 0:eae101ae93c0 12 mpu9250.Initialize();
taknokolat 0:eae101ae93c0 13
taknokolat 0:eae101ae93c0 14 while(1){
taknokolat 0:eae101ae93c0 15 mpu9250.sensingPostureAngle(degrees);
taknokolat 0:eae101ae93c0 16 Serial.printf("pitch:%f, roll:%f, yaw,%f\n",degrees[0],degrees[1],degrees[2]);
taknokolat 0:eae101ae93c0 17 }
taknokolat 0:eae101ae93c0 18 }
taknokolat 0:eae101ae93c0 19 */