Hello, I'm using this sensor (MPU-6050 6DOF) for my final project. The idea is to create a 3D colour picker with processing. It's fitted into a box that it's moved with the hand. I have almost everything working except for the arduino's side.
I started with the dmp code of Jeff Rowberg http://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/Examples/MPU6050_DMP6/MPU6050_DMP6.ino
using it as a camera so you can see all the RGB cube. After struggling a little bit I managed to implement the gyroscope as a camera. The problem came when I noticed that suddenly it stops, or starts to turn more fast than graphics can handle even being still.
I realized it was when I left it at the table with some energy. So the thing is that it happens after a small (really small) hit. Each time it's worse.
It gives null pointer exception
I have two possible theories:
- One is that is a peak of information that cannot be handled,
- and the other is that the hardware (the sensor) it's too sensitive even for that type of application.
Any help will be welcome, I know how to create the problem, but no how to solve.
BTW, any ideas why after a several runs of the processing code it gaves:Error inside Serial.write()
and I can only solve it by rebooting the computer.