Darley Gonzalez
/
MPU_6050_Hello_World
programa para hacer la lectura de un sensor MPU6050, el cual entrega el valor de gyro y del acelerómetro.
Revision 1:4f9708c81c3a, committed 2021-03-01
- Comitter:
- darley_gonzalez
- Date:
- Mon Mar 01 22:33:58 2021 +0000
- Parent:
- 0:1221112820f7
- Commit message:
- MPU6050
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Oct 18 17:04:36 2018 +0000 +++ b/main.cpp Mon Mar 01 22:33:58 2021 +0000 @@ -26,9 +26,10 @@ #include <math.h> #define pi 3.141592654 -MPU6050 AccGyro(PB_3, PB_10); // Create an MPU object called AccGyro +//MPU6050 AccGyro(PTC2, PTC1); // Create an MPU object called AccGyro +MPU6050 AccGyro(I2C_SDA, I2C_SCL); // Create an MPU object called AccGyro -Serial pc(SERIAL_TX, SERIAL_RX); //To use the PC as a console (display output) +Serial pc(USBTX, USBRX); //To use the PC as a console (display output) int16_t Ax, Ay, Az, Gx, Gy, Gz; float Ax_f, Ay_f, Az_f;