So, i'm using the mpu6050 and the i2cdev libraries, and that all seems to be working out well. Definitely better than me dealing with raw gyro and accelerometer data - that was a nightmare as soon as the props started spinning.
Everything was testing out ok standalone, but then I wanted to switch over to using my xbee modules for comms with my remote controller (a pc with a joystick).
I hate fighting with the things at higher baud rates than 9600, but as soon as I do that (i.e. Use 9600 vsthe mpu6050 example programs use 115200 baud), it throws a wrench into things. I.e. The fifo buffer on the 6050 gets blown, as the program is spending too much time spitting data across a slow connection, I think. In addition to the fifo buffer problem, the yaw pitch roll numbers eventually seem to freeze or go wonky.
So, i tried to set up a timer interrupt (google the "TimerOne" arduino libraries), and just check once a second whether the remote wants the new yaw pitch roll numbers. It's been running like that ok for about half an hour.
In any case, maybe I need an alternative to the xbees (like those nice radio controllers from jhobbyking....)
You can see the mpu6050 on the left (the breakout says "GY-521") and the XBee at the bottom right of the photo.
Output on the PC:
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.