additional edits to James’ code

Committer:
isagmz
Date:
Wed Jul 03 18:14:34 2019 +0000
Revision:
13:f9a20b88455c
Parent:
12:6efce6d008f8
additional edits

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jahutchi 12:6efce6d008f8 1 #include <MPU6050.h>
jahutchi 12:6efce6d008f8 2 #include "IMU6050.h"
jahutchi 12:6efce6d008f8 3 MPU6050 IMU(D14, D15);
jahutchi 12:6efce6d008f8 4 Serial pc(USBTX, USBRX, 57600); //Serial Monitor
jahutchi 12:6efce6d008f8 5 float dataA[3];
jahutchi 12:6efce6d008f8 6 float* data = dataA;
jahutchi 12:6efce6d008f8 7 int main()
jahutchi 12:6efce6d008f8 8 {
jahutchi 12:6efce6d008f8 9 IMU.setGyroRange(MPU6050_GYRO_RANGE_500);
jahutchi 12:6efce6d008f8 10 pc.printf("Imu test connections %d\r\n", IMU.testConnection());
jahutchi 12:6efce6d008f8 11 while(1){
jahutchi 12:6efce6d008f8 12
jahutchi 12:6efce6d008f8 13 IMU.getGyro(data);
jahutchi 12:6efce6d008f8 14 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);
jahutchi 12:6efce6d008f8 15 wait(.2);
jahutchi 12:6efce6d008f8 16 }
jahutchi 12:6efce6d008f8 17 }