![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
asdfsaf
Dependencies: MPU6050-DMP-Ian mbed-rtos mbed
main.cpp
- Committer:
- majik
- Date:
- 2014-05-27
- Revision:
- 0:dceb852b19f3
File content as of revision 0:dceb852b19f3:
/* This code is in working condition. DMP works in RTOS environment */ #include "mbed.h" #include "rtos.h" #include "robot.h" #include "MPU6050_6Axis_MotionApps20.h" #include "DMP.h" //int main() { void led2_thread(void const *args){ DigitalOut reset_pin(PTE5); test_dmp(); MPU6050 mpu; myled = 0; //turn on LED btSwitch = 1; bt.baud(baudRate); //set baud rate for bluetooth device start_dmp(mpu); while(1){ //bt.baud(baudRate); //reset_pin = 0; if(!mpuInterrupt && fifoCount < packetSize); //interrupt not ready else{ //mpu interrupt is ready update_dmp(mpu); mpuInterrupt = false; //this resets the interrupt flag } } } int main() { Thread thread(led2_thread); while (true) { Thread::wait(500); } }