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 #include <MPU6050.h> 00002 #include "IMU6050.h" 00003 MPU6050 IMU(D14, D15); 00004 Serial pc(USBTX, USBRX, 57600); //Serial Monitor 00005 float dataA[3]; 00006 float* data = dataA; 00007 int main() 00008 { 00009 IMU.setGyroRange(MPU6050_GYRO_RANGE_500); 00010 pc.printf("Imu test connections %d\r\n", IMU.testConnection()); 00011 while(1){ 00012 00013 IMU.getGyro(data); 00014 pc.printf("x: %f, y: %f, z: %f\r\n", dataA[0]*180/3.14, dataA[1]*180/3.14, dataA[2]*180/3.14); 00015 wait(.2); 00016 } 00017 }
Generated on Fri Jul 15 2022 05:53:38 by
1.7.2