~
Dependencies: 4DGL-uLCD-SE SDFileSystem
Diff: main.cpp
- Revision:
- 8:964e12b5b51e
- Parent:
- 7:1a21d8290cf1
- Child:
- 9:63c3c734a620
--- a/main.cpp Mon Sep 26 17:26:28 2016 +0000 +++ b/main.cpp Mon Sep 26 17:46:07 2016 +0000 @@ -46,15 +46,17 @@ const char * c = str.c_str(); pc.printf(c); } +} //imu9DS1 imu(p9, p10, 0x6B, 0x1E); + /* LSM9DS1 imu(p9, p10, 0xD6, 0x3C); imu.begin(); if (!imu.begin()) { lcd.printf("Failed to communicate with imu9DS1.\n"); } imu.calibrate(); - + */ // part 9, speaker /* @@ -65,19 +67,21 @@ mySpeaker.PlaySong(note,duration); double theta; */ - int ax, ay; + //int ax, ay; + /* while(1) { // loops forever while song continues to play to end using interrupts - imu.calibrate(); + /* imu.readAccel(); imu.readMag(); imu.readGyro(); - + */ //lcd.printf("%d %d %d %d %d %d %d %d %d\n\r", imu.calcGyro(imu.gx), imu.calcGyro(imu.gy), imu.calcGyro(imu.gz), imu.ax, imu.ay, imu.az, imu.mx, imu.my, imu.mz); //lcd.printf("%d %d %d\n\r", imu.calcGyro(imu.gx), imu.calcGyro(imu.gy), imu.calcGyro(imu.gz)); //lcd.printf("gyro: %d %d %d\n\r", imu.gx, imu.gy, imu.gz); //lcd.printf("accel: %d %d %d\n\r", imu.ax, imu.ay, imu.az); //lcd.printf("mag: %d %d %d\n\n\r", imu.mx, imu.my, imu.mz); + /* if (push) { lcd.filled_circle(64 + ax / 250, 64 + ay/ 250 , 8, BLACK); ax = imu.ax, ay = imu.ay; @@ -92,9 +96,7 @@ lcd.locate(0,1); lcd.printf("%f",180 * theta / 3.14159); } - - } -} + */ // serial com, print statements sent to lcd now /* part 1