a
Diff: main.cpp
- Revision:
- 17:f2e2692762ac
- Parent:
- 16:caf587f09e34
diff -r caf587f09e34 -r f2e2692762ac main.cpp --- a/main.cpp Tue Jul 09 23:33:28 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -#include <MPU6050.h> -#include "IMUWheelchair.h" -//MPU6050 IMU(D14, D15); -Serial pc(USBTX, USBRX, 57600); //Serial Monitor -float dataGyro[3]; -float *dataG = dataGyro; -Timer t; -float dataYaw[3]; -float *dataY = dataYaw; -IMUWheelchair IMU(&pc,&t); - -int main() -{ - t.start(); - //pc.printf("Imu test connections %d\r\n", IMU.testConnection()); - while(1){ - - //IMU.getGyro(dataG); - // pc.printf("x: %f, y: %f, z: %f\r\n", dataGyro[0]*180/3.14, dataGyro[1]*180/3.14, dataGyro[2]*180/3.14); - //IMU.gyro_x(); - // IMU.getAcceleroAngle(dataY); - // pc.printf("x: %f, y: %f, z: %f\r\n", dataG[0]*180/3.1415926 + .79, dataG[1], dataG[2]); - // printf("%f, %f, %f\n", IMU.gyro_x(), IMU.gyro_y(), IMU.gyro_z()); - // printf("%f\r\n ", IMU.accel_x()); - - pc.printf("%f\r\n", IMU.gyro_x()); - // printf("%f\r\n ", IMU.yaw()); - } -}